You need to sign in to do that
Don't have an account?
nits
Not able to work on data types..
1) var oc= '{!TestScreen__c.Occupancy__c}';
alert(oc);
alert(oc);
2) var oc= {!TestScreen__c.Occupancy__c};
alert(oc);
alert(oc);
Statement 2) gives error. I am not able to find the error.
ckemp
The error is that, basically, stuff within the {! [...] } is replaced with values before the Javascript is run by your browser, more or less. So to your browser, #1 looks like "var oc = 'my substituted value';" (correct) and #2 looks like "var oc = my substituted value;" (incorrect, will generate an error.)
AkiT
Quotes are missing in the #2.