Syntax error 8 at line 9


hi,

 

i'm trying run script used calculate value of field based on conditions. should see if checkbox, forcekno, checked , check see if "1f2" not have value of 5. if both of conditions true, should return value of field "1t". if other combination of conditions true, should return value of sum of fields 1f2 + 1f3 + 1f4 + mod kno + 1/2 level

 

i know nothing java or coding , pieced using forum , web sites addressed similar types of errors. think copied syntax of code, keep getting errors. here code:

 

var c=getfield("forcekno").value;

var o=getfield("1f2").value;

var v1 = getfield("1f2").value;

var v2 = getfield("1f3").value;

var v3 = getfield("1f4").value;

var v4 = getfield("mod kno").value;

var v5 = getfield("1/2 level").value;

if ( ( c=="1" ) && ( o<>"5" ) ) event.value = getfield("1t").value;

else {

event.value = (v1 + v2 + v3 + v4 + v5);

}

the syntax error you're using wrong operator "not equals". needs "!=", not "<>".

also, should remove quotes around numbers in if-condition.



More discussions in JavaScript


adobe

Comments

Popular posts from this blog

Adobe Reader DC install error 150410

Adobe Acrobat Reader DC Updater error: 130200 in Win 7 64bit

Error: 100600 Update failed, updates have been disabled by your system policy