Possible Duplicate:
How can I convert a string to boolean in JavaScript?
I have a hidden field that contains a boolean value, I am checking if it's true or false in a javascript function, like this:
if (Trim(document.forms['mainform'].hiddenfield.value) == 'true')
{
}
which I think is a lame way to do this. I was wondering how to convert that string value into a boolean?
Thanks