I am having some problems getting the immediate if statement (iif) to work in javascript. Is there a particular version of javascript I should be using? I will be operating on an Apache server.
immediate if statement
Collapse
X
-
Okay. Here's my code, according to your instructions. It causes an error saying "object expected"
I also tried the syntax I use in other languages but got the same errorCode:var cGVW= iif((cBody=="Tractor")? rtrim(document.getElementById('GVW'+x).value): "");
what am I doing wrong?Code:var cGVW= iif(cBody=="Tractor", rtrim(document.getElementById('GVW'+x).value), "");Comment
-
the syntax (as far as I know there is no iif() function).
see MDC – Conditional OperatorCode:var x = condition ? true_statement : false_statement;
Comment
Comment