need help for a page

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
susrisha
Forum Contributor
Posts: 439
Joined: Thu Aug 07, 2008 11:43 pm
Location: Hyderabad India

need help for a page

Post by susrisha »

Moved from Job Hunt. Please post in an appropriate forum in the future.

I need to write a page where the user can select from any of the three options..

option one is a username where there is a html select button with options showing all the users of a particular DB.

option two is a groupname where there is a html select button for options showing all the groups in DB.

option three is an input text box..

I need the user to choose any one of the above three and the rest must get inactive and unaccessed once the user selects any one of them..

How can i probably do that?? check box wont help coz it can also take multiple inputs.. Dont know how to try it with radio buttons.. any help is appreciated
User avatar
jaoudestudios
DevNet Resident
Posts: 1483
Joined: Wed Jun 18, 2008 8:32 am
Location: Surrey

Re: need help for a page

Post by jaoudestudios »

Radio buttons are very similar to checkboxes. Just keep the name attribute the same on all the radios buttons then the user will only be allowed to select 1.
coder500
Forum Newbie
Posts: 20
Joined: Fri Jul 25, 2008 10:24 am
Location: Singapore

Re: need help for a page

Post by coder500 »

I tried that. I hope the following code will be helpful.

Code: Select all

 
<form id="form1" name="form1" method="post" action="">
<p>
<label>
<input type="radio" name="RadioGroup1" value="1" />
First Item From database1</label>
 
<label>
<input type="radio" name="RadioGroup1" value="3" />
First Item from Database2</label>
 
<label>
<input type="radio" name="RadioGroup1" value="4" />
Second item From database2</label> 
 
<label>
<input type="radio" name="RadioGroup1" value="2" />
Second Item From database1</label>
<br />
</p>
<label>
<input type="radio" name="RadioGroup1" value="" />
<input type="text" /></label>
<p><strong>Code for the above radio buttons </strong></p>
<p>&nbsp;</p>
</form>
 
Post Reply