form with section that grays out if not selected

rh71

No Lifer
Aug 28, 2001
52,844
1,049
126
Have a form with 3 radio button options. Want the following...

Under option 3 is grayed out text & an input box (disabled) that will only become active if radio button 3 is selected. This should all get passed to the next .asp page. If they select another radio button, it becomes grayed out again.

Any direction for something like this? Can this be done via javascript alone? Instead of grayed text, I suppose it can be hidden completely as well.

Thanks.
 
Last edited:

rh71

No Lifer
Aug 28, 2001
52,844
1,049
126
^ I did find that one but I'm looking for more than just disabling the text box like they're doing there... I want the section under option 3 to be grayed out (change text color?) or hidden unless it is currently selected. I wish I could find a live example...
 

Ka0t1x

Golden Member
Jan 23, 2004
1,724
0
71
Should be fairly simple to do this with jQuery and 'click' listener... then hide() or show() your div/container.
 

SJP0tato

Senior member
Aug 19, 2004
267
0
76
Not 100% sure what you're trying to do still, but maybe you want to wrap the 3rd option in a div, set the style display to "none". Then when they select a different option, change the display to "inline".

Something like:
<div style="display: none;">
Third option stuff here
</div>