I am trying to add a barcode verify function to an item picking webapp page and i have the javascript as this:
function barcodeSubmit () {
if (barcode1 != barcode || barcode2 != barcode) {
if (PUT_LPN == "") {
barcodeF.focus();
return false;
}
} else {
if (barcode1 != barcode || barcode2 != barcode) {
if (PUT_LPN != "") {
barcodeF.focus();
return false;
}
}
}
} else {
if (barcode1 == barcode || barcode2 == barcode) {
if (PUT_LPN == "") {
PUT_LPN.focus();
return false;
}
}
}
else {
if (barcode1 == barcode || barcode2 == barcode) {
if (PUT_LPN != "") {
return true;
}
}
}
}
When I submit this form it does not submit and I can not get it to do the function its connected to an onclick input field . It does call when I make it simpler it will execute what I want. I also tried it without the else statements and came out with slightly different result but still not triggering event properly
thisrefer to which formifwith 4elsewhich is wrong. Useelse if