This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Radio buttons(URGENT) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Radio buttons(URGENT)" Watch "Radio buttons(URGENT)" New topic

Radio buttons(URGENT)

Angela D'souza
Ranch Hand

Joined: Jan 16, 2002
Posts: 469
I have two radio buttons and one text box,
<INPUT name="option" type="radio" value="true">
<INPUT name="option" type="radio" value="false">
<INPUT name="test" type="text" value="Test">
(1)How would I know that which radio button selected by user?
(2)When user selects the radio button which has value="false", how can I disable textbox and empty textbox?
Vijay S. Rathore
Ranch Hand

Joined: Oct 29, 2001
Posts: 449
document.forms[0].test.value = "";

SCJP, SCJD, SCWCD1.4, IBM486, IBM484, IBM 483, IBM 287, IBM141, IBM Certified Enterprise Developer - WebSphere Studio, V5.0
Author of IBM 287 Simulator Exam
Angela D'souza
Ranch Hand

Joined: Jan 16, 2002
Posts: 469
thanks I got it...
I agree. Here's the link:
subject: Radio buttons(URGENT)
Similar Threads
Urgent about javascript ,Thanks
Need Help with Function Operate
radio buttons selection
Urgent...Need help on form submit
help with radio buttons