Javascript returns string but not boolean!
Posted: Fri Aug 28, 2009 10:25 am
Hi,
I try to use this code:
The value of "bip" element is true or false only.
But, when I execute the code, the value is always set to false, because the line script return a string, and not boolean value.
How do I use the script to return a boolean value?
Thanks by advance.
I try to use this code:
Code: Select all
<data name="auth" src="Get.aspx" namelist="ID phone" maxage="0"/>
<script>
bip = auth.documentElement.getElementsByTagName("bip").item(0).firstChild.data;
</script>
...
<field name="msg" cond="bip==false">
...
</field>
But, when I execute the code, the value is always set to false, because the line script return a string, and not boolean value.
How do I use the script to return a boolean value?
Thanks by advance.