Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-10-2004, 09:40 PM   PM User | #1
nikko50
Regular Coder

 
Join Date: May 2004
Posts: 375
Thanks: 62
Thanked 0 Times in 0 Posts
nikko50 is an unknown quantity at this point
dynamic form

Hi all.
I have a form with 3 radio buttons. Each option should give you a different text box. Like if i select the Dodge radio button a select box will appear with options. If the user selects Ford a different select box will appear. How can I go about this ?? Please help.
Thanks
Tracy
nikko50 is offline   Reply With Quote
Old 11-10-2004, 09:56 PM   PM User | #2
hemebond
Senior Coder

 
Join Date: Jul 2004
Location: New Zealand
Posts: 1,315
Thanks: 0
Thanked 2 Times in 2 Posts
hemebond is an unknown quantity at this point
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
	<head>
		<title>47312</title>
		<style type="text/css">
			dt,dd	{
				float:left;
			}
			dt	{
				clear:left;
			}
		</style>
	</head>
	<body>
		<form>
			<fieldset>
				<dl>
					<dt><label for="radio1">Radio 1</label></dt>
					<dd><input id="radio1" name="radio" type="radio" checked="checked"></dd>
					<dd>
						<select>
							<option>Option 1</option>
							<option>Option 2</option>
							<option>Option 3</option>
						</select>
					</dd>

					<dt><label for="radio2">Radio 2</label></dt>
					<dd><input id="radio2" name="radio" type="radio"></dd>
					<dd>
						<select>
							<option>Option 1</option>
							<option>Option 2</option>
							<option>Option 3</option>
						</select>
					</dd>
				</dl>
			</fieldset>
		</form>
	</body>
</html>
hemebond is offline   Reply With Quote
Old 11-11-2004, 01:57 AM   PM User | #3
nikko50
Regular Coder

 
Join Date: May 2004
Posts: 375
Thanks: 62
Thanked 0 Times in 0 Posts
nikko50 is an unknown quantity at this point
Hi there.
Instead of radio buttons how about one select list. Choosing one of 3 options should produce a text field or another drop list right next to the original drop list.
nikko50 is offline   Reply With Quote
Old 11-18-2004, 01:23 PM   PM User | #4
JVRudnick
New Coder

 
Join Date: Jul 2002
Posts: 88
Thanks: 0
Thanked 0 Times in 0 Posts
JVRudnick is an unknown quantity at this point
nikko50

nevermind...got it!
Jim

Last edited by JVRudnick; 11-18-2004 at 06:50 PM.. Reason: resolved
JVRudnick is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:37 AM.


Advertisement
Log in to turn off these ads.