Can you explain why the if condition doesn't work without the eval function:
var myBoolean= document.getElementById("someBoolean").value; //This is a 'false'
if(myBoolean)
{
alert(Your boolean is True); //This condition always getting executed even though myBoolean is false;
}
if(eval(myBoolean))
{
alert("You will never see this alert bcoz boolean is false");
}
document.getElementById("someBoolean");return'false'?document.getElementById("someBoolean");returns a DOM element (ornull). To get the value you'd have to dodocument.getElementById("someBoolean").value;.