Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Radio buttons(URGENT)

 
Angela D'souza
Ranch Hand
Posts: 469
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 449
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if(document.forms[0].option[0].checked){
document.forms[0].test.value = "";
}
 
Angela D'souza
Ranch Hand
Posts: 469
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks I got it...
Angela
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic