Within my JSP file, I have the following code snippet:
<input type="submit" value="Transfer ULD" onclick="doSomething();" name="_eventId_transferULDTransition"/>
The doSomething()
function mentioned above is a JavaScript method.
function doSomething() {
var transferType = document.getElementById('equipmentType').value;
if(${uldSelector.baseLoadToUse.uldEquipType} == 02 &&
(transferType == 01 || transferType == 13 || transferType == 07)){
var r = confirm("Still want to tranfer Air Container?");
if (r == true) {
return true;
} else {
return false;
}
}
}
Within this method, there are around 4 to 5 conditions...
The desired functionality is for the action to continue when the user clicks 'OK' and to cancel when they click 'CANCEL'...
However, in practice, it seems to submit in both scenarios using Spring Webflow, Spring MVC, and Java.
I would greatly appreciate any suggestions or advice on how to address this issue! Thank you!