File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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)
It's not a secret anymore!