Jump to content

help me get this woking..


php_novice2007

Recommended Posts

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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.