Possible Duplicate:
How can I convert a string to boolean in JavaScript?
I have a select list with 2 options in it, yes or no, something like:
<select size="1">
<option value="true">yes</option>
<option value="false">no</option>
</select>
Now i want to use the selected value in the jquery-UI button disabled property , means :
$("button").button({ disabled : $("select").val() });
Now my problem is that the value which we will get by $("select").val() is string and for
disabled property we need boolean. So i want to know that is there any method just like
pareInt or parseFloat by which we can convert a string to boolean ?