GeeCON Prague 2014*
The moose likes HTML, CSS and JavaScript and the fly likes radio button 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 button" Watch "radio button" New topic
Author

radio button

pradeep ms
Greenhorn

Joined: Oct 09, 2006
Posts: 3
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

Joined: Nov 24, 2005
Posts: 14688
    
  16

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.


[My Blog]
All roads lead to JavaRanch
pradeep ms
Greenhorn

Joined: Oct 09, 2006
Posts: 3
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

Joined: Nov 08, 2001
Posts: 15376
    
    6
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

Joined: Nov 24, 2005
Posts: 14688
    
  16

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

Joined: Mar 20, 2005
Posts: 256

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.


Life called,so here I am.<br />Cheers<br />Niki.:-)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: radio button