How do I say, if a given form field value is equal to nothing then do something, else do something else.
This is what I have, so far:
if(document.step3[FieldName].value = ''){
DO SOMETHING...
}
else{
DO SOMETHING ELSE...
}
but I can't seem to format the IF statment properly.
So how do I write if the passed value in form step3 equal to nothing then do it.
Also how do I write NOT EQUALS.
p.s FieldName is passed to the script as a variable.
Cheers.
This is what I have, so far:
if(document.step3[FieldName].value = ''){
DO SOMETHING...
}
else{
DO SOMETHING ELSE...
}
but I can't seem to format the IF statment properly.
So how do I write if the passed value in form step3 equal to nothing then do it.
Also how do I write NOT EQUALS.
p.s FieldName is passed to the script as a variable.
Cheers.