You need to sign in to do that
Don't have an account?

AJAX and Boolean issue
I know this is probably a very simple thing, but I am stuck.
I am returning a custom checkbox field using AJAX (through SControl). I am then trying to do a if statement (if true, then...)
Here is that part of the code.
var CUSTOMFIELD = queryresult.get("customfield");
if (CUSTOMFIELD == true)
{
"CUSTOMFIELD is True"
};
I have tried
== true
== "true"
== 1
None seem to work. If I am getting the result, what value can I use? I put in an alert and the value returned says true.
Thanks!
I am returning a custom checkbox field using AJAX (through SControl). I am then trying to do a if statement (if true, then...)
Here is that part of the code.
var CUSTOMFIELD = queryresult.get("customfield");
if (CUSTOMFIELD == true)
{
"CUSTOMFIELD is True"
};
I have tried
== true
== "true"
== 1
None seem to work. If I am getting the result, what value can I use? I put in an alert and the value returned says true.
Thanks!
Message Edited by Bill_G on 01-24-2006 11:05 AM
... do something
if (CUSTOMFIELD == true)
{
"CUSTOMFIELD is True"
};