Page 1 of 1

need help for a page

Posted: Sat Aug 09, 2008 8:11 am
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

Re: need help for a page

Posted: Wed Aug 13, 2008 11:04 am
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.

Re: need help for a page

Posted: Sun Aug 17, 2008 8:00 am
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>