File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Author

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">
Now,
(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?
Thanks,
Angela
Vijay S. Rathore
Ranch Hand

Joined: Oct 29, 2001
Posts: 449
if(document.forms[0].option[0].checked){
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...
Angela
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Radio buttons(URGENT)