shane18 Posted May 20, 2010 Share Posted May 20, 2010 document.getElementById("LS").disabled="true"; -Works document.getElementById('LS').disabled="false"; -Fails document.getElementById('LS').disabled=false; -Works -Why??? Link to comment https://forums.phpfreaks.com/topic/202334-disabled-question/ Share on other sites More sharing options...
Alex Posted May 20, 2010 Share Posted May 20, 2010 Any string will evaluate to true. So "true" == true, "false" == true or "anything" == true. You're setting a boolean value, not a string so you should not use quotes. Link to comment https://forums.phpfreaks.com/topic/202334-disabled-question/#findComment-1060927 Share on other sites More sharing options...
shane18 Posted May 20, 2010 Author Share Posted May 20, 2010 thanks im still getting use to javascript lol Link to comment https://forums.phpfreaks.com/topic/202334-disabled-question/#findComment-1060928 Share on other sites More sharing options...
ignace Posted May 20, 2010 Share Posted May 20, 2010 thanks im still getting use to javascript lol It's not only JS, it's also PHP Link to comment https://forums.phpfreaks.com/topic/202334-disabled-question/#findComment-1061031 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.