I am trying to use the onClick event to change the disabled status and background color of an input box.
I have two option buttons - 'Full day' and 'Partial Day' (it is a time-off request form). The 'times-requested' input box starts off disabled and greyed out.
I want the input box to 'enable' and change from grey to white when the correct radio button (Partial Day) is clicked, and vice-versa if they change their mind and click 'Full Day.
I got it to 'enable' but can't get the color to change. I have tried both using a function and calling it, and just using the onClick event (but i am a newbie).
Does all this make sense? Can anyone offer any suggestions? It would be greatly appreciated!
Here is an example of what I am trying to do:
<INPUT TYPE="Radio" NAME="HowMuchTime" VALUE=http://www.webdeveloper.com/forum/archive/index.php/"Partial Day" OnClick="times_requested.disabled=false">
<font color="#FF0000" size="-1">------------> <em>If Partial Day - Times Requested:</em></font>
<INPUT disabled size=22 name=times_requested>
I have two option buttons - 'Full day' and 'Partial Day' (it is a time-off request form). The 'times-requested' input box starts off disabled and greyed out.
I want the input box to 'enable' and change from grey to white when the correct radio button (Partial Day) is clicked, and vice-versa if they change their mind and click 'Full Day.
I got it to 'enable' but can't get the color to change. I have tried both using a function and calling it, and just using the onClick event (but i am a newbie).
Does all this make sense? Can anyone offer any suggestions? It would be greatly appreciated!
Here is an example of what I am trying to do:
<INPUT TYPE="Radio" NAME="HowMuchTime" VALUE=http://www.webdeveloper.com/forum/archive/index.php/"Partial Day" OnClick="times_requested.disabled=false">
<font color="#FF0000" size="-1">------------> <em>If Partial Day - Times Requested:</em></font>
<INPUT disabled size=22 name=times_requested>