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~! Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.