Hello,
I'm trying to implement the following.
I should have 4 radio buttons.
If i select the 1st radio button i should get a selection of items in a list box, if i select a second radio buton i should get another selection of items in the list and so on. I donot know if i have to do it using Java Script or PHP. ANy help is really appreciated.
Dynamic Selection from a radio button to a list box
Moderator: General Moderators
Here is the code.
Thanx for your help
Code: Select all
<html>
<head>
<title>Dynamic Form</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<div align="center">
<p><strong><font size="2" face="Arial, Helvetica, sans-serif">Please Enter the
Details</font></strong> </p>
<form name="form1" method="post" action="">
<p align="left"> </p>
<table width="40%" border="1" align="left" cellpadding="0" cellspacing="0">
<tr>
<td width="50%"><strong><font size="2" face="Arial, Helvetica, sans-serif">First
Name</font></strong></td>
<td width="50%"> <input type="text" name="middle"> </td>
</tr>
<tr>
<td><strong><font size="2" face="Arial, Helvetica, sans-serif">Middle</font></strong></td>
<td><input type="text" name="textfield2"></td>
</tr>
<tr>
<td><strong><font size="2" face="Arial, Helvetica, sans-serif">Last Name</font></strong></td>
<td><input name="lname" type="text"></td>
</tr>
</table>
<p align="left"> </p>
<p align="left"><br>
</p>
<p align="left"><strong>Select One:</strong></p>
<p align="left">
<input type="radio" name="radiobutton" value="HS">
<font size="2" face="Arial, Helvetica, sans-serif"><strong>HS</strong></font></p>
<p align="left"><font size="2" face="Arial, Helvetica, sans-serif"><strong>
<input type="radio" name="radiobutton" value="MS">
MS</strong></font></p>
<p align="left"><font size="2" face="Arial, Helvetica, sans-serif"><strong>
<input type="radio" name="radiobutton" value="ES">
ES </strong> </font></p>
<p align="left"><font size="2" face="Arial, Helvetica, sans-serif">Please
select your Locality
<select name="select">
</select>
</font></p>
<p align="left">
<input type="submit" name="Submit" value="Submit">
</p>
<p align="left"> </p>
</form>
<p align="left"> </p>
</div>
</body>
</html>
If I selct the the radio button HS, i should get a list with the items{ blank,HS1,HS2,HS3,HS4}
If I selct the the radio button MS, i should get a list with the items{ blank,MS1,MS2,MS3,MS4}
If I selct the the radio button ES, i should get a list with the items{ blank,ES1,ES2,ES3,ES4}
Last edited by Kingo on Mon Jun 14, 2004 8:40 am, edited 1 time in total.
Edit your post and use
Code: Select all
-tags around it.-
fastfingertips
- Forum Contributor
- Posts: 242
- Joined: Sun Dec 28, 2003 1:40 am
- Contact: