php_novice2007 Posted August 29, 2007 Share Posted August 29, 2007 Hi, I've got the following code: HTML: <form name="myform1" action="b.php" method="POST"> <input type=radio checked name="CommandType" onclick="radioclick0();" value="0">Normal Command <input type=radio name="CommandType" onclick="radioclick1();" value="1">Put in Recovery Mode <input type="text" size=10 name=log_int value=5><br> </form> JS: function radioclick0() { document.myform1.log_int.disabled = "no"; } function radioclick1() { document.myform1.log_int.value = "0"; document.myform1.log_int.disabled = "yes"; } When the form is loaded, things are fine, as soon as I click on a radio button, the field is disabled, doesn't matter which button I click.... How do I fix it? Thanks~! Link to comment https://forums.phpfreaks.com/topic/67176-help-me-get-this-woking/ Share on other sites More sharing options...
php_tom Posted August 30, 2007 Share Posted August 30, 2007 This: function radioclick0() { document.myform1.log_int.disabled = "no"; } function radioclick1() { document.myform1.log_int.value = "0"; document.myform1.log_int.disabled = "yes"; } should be function radioclick0() { document.myform1.log_int.disabled = false; } function radioclick1() { document.myform1.log_int.value = "0"; document.myform1.log_int.disabled = true; } It worked in FF for me. Link to comment https://forums.phpfreaks.com/topic/67176-help-me-get-this-woking/#findComment-337676 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.