Guest_imported
New member
- Jan 1, 1970
- 0
I am struggling with what appears to be a problem with an IF statement in my javascript program. I have the statement:
if((insal<10000) || (inpayback!=paytwo) || (inpayback!=payone))
{
//display error message
alert("Invalid entry. Please adjust details"
;
}
else
{...}
If I run the pogram as shown above, the alert mesage always appears when the event if captured. If however I removed the last of the three conditions (|| (inpayback!=payone)))the IF statement functions as it should.
Does anyone have a suggestion???
PS If you reply saying the my brackets are wrong, please explain why!?!
if((insal<10000) || (inpayback!=paytwo) || (inpayback!=payone))
{
//display error message
alert("Invalid entry. Please adjust details"
}
else
{...}
If I run the pogram as shown above, the alert mesage always appears when the event if captured. If however I removed the last of the three conditions (|| (inpayback!=payone)))the IF statement functions as it should.
Does anyone have a suggestion???
PS If you reply saying the my brackets are wrong, please explain why!?!