File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

radio button

 
pradeep ms
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I have two radio button
1.radio buttion----- text box1
2 radio button ----- text box2
text box3

If I click radio button 1 then radio button 2 and (text box2&3) should be disabled.
If I click radio buttion2 then radio button 1 and(textbox1) should be diabled

PLS HELP ME IN THIS. IT IS URGENT
BYE.
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I click radio button 1 then radio button 2

How are you going to click radio2 if you disable it
I think you should disable only textboxes, not radio buttons.
 
pradeep ms
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
yes satou. Pls to all.
I have two radio button
1.radio buttion----- text box1
2 radio button ----- text box2
text box3

If I click radio button 1 then radio button 2 and (text box2&3) should be disabled.
If I click radio buttion2 then (textbox1) should be diabled

PLS HELP ME IN THIS. IT IS URGENT
BYE.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
NO ONE IS GOING TO WRITE THE CODE FOR A PERSON THAT DEMANDS IT AND USES CAPS AND DOES NOT KNOW HOW TO SPELL OUT FULL WORDS SO PEOPLE THAT DO NOT UNDERSTAND ENGLISHG THAT WELL WILL NOT BE ABLE TO READ.

Now since caps in this world of forums and IM means you are screaming, do you see the problem with the message I wrote above. Yes. Do you see a problem you have with your message?

You already have been warned about your name here on the ranch before with this thread: http://www.coderanch.com/t/118856/HTML-JavaScript/javascript-select-option. There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Please do not use IM lingo in our forum, please do not demand stuff. This forum is not a code generator for you. It is here to help you learn. Also you title of this post is not very helpfull. Radio Button tells me nothing!

I think you need to learn if statements and document.forms[0].elementName.disabled = "true|false";

Eric Pascarello
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And I'm still asking : "How are you going to click radio2 if you disable it once ?"
You're second post doesn't answer that.
 
Niki Nono
Ranch Hand
Posts: 256
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Handle the above in the on click of the radio buttons.
And yes satou is right, how will you click on radio2 once you have clicked on radio1 since it gets disabled.
anyway try the above and see if it works for you.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic