...

View Full Version : Auto Drop Down



Racer
03-13-2005, 04:25 AM
I basicly need something like:

http://javascript.internet.com/form...-drop-down.html

But instead of the list it gives you (After you select something from the drop down menu), I need it to have text boxes. I also only need 2 different things in the Drop Down Menu.

I've tryed this over and over again and can't get it to work... Can someone please post the code for what I am trying to do?

For Example:

Option 1) Boat
Option 2) Car

If Selected 'Boat', they would recieve something like:

"What kind of boat do you like?' [_______TEXT BOX________]
"How often do you boat?' [_______TEXT BOX________]

If Selected 'Car', they would recieve something like:

"What kind of car do you like?' [_______TEXT BOX________]
"How often do you drive in your car?' [_______TEXT BOX________]

Thanks.

vwphillips
03-13-2005, 09:41 AM
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

<html>

<head>
<title></title>
<script language="JavaScript" type="text/javascript">
<!--

function Show(obj){
if (obj.selectedIndex<1){ return; }
obj=obj.options[obj.selectedIndex].value;
document.getElementById('boat').style.display='none';
document.getElementById('car').style.display='none';
document.getElementById(obj).style.display='block';
}
//-->
</script>

</head>

<body>
<select name="" size="1" onchange="javascript:Show(this)" >
<option value="" >Select</option>
<option value="boat" >Boat</option>
<option value="car" >Car</option>
</select>
<br>
f Selected 'Boat', they would recieve something like:
<p id="boat" style="position:relative;display:none;" >
"What kind of boat do you like?' <input name="" size="10"><br>
"How often do you boat?' <input name="" size="10"><br>
</p>
<br>
If Selected 'Car', they would recieve something like:
<p id="car" style="position:relative;display:none;" >
"What kind of car do you like?' <input name="" size="10"><br>
"How often do you drive in your car?' <input name="" size="10"><br>
</b>
</body>

</html>

Racer
03-13-2005, 11:31 PM
Awesome! THANKS!

Now, I can't get the Submit button to work. I'm using:

<FORM action="MAILTO:lightening_larmore_racing@yahoo.com" enctype="text/plain" NAME="myform" ACTION="" METHOD="GET">

-

<input type="submit" value="Send">
<input type="reset" value="Reset">

But when I hit "Submit" it only opens a new e-mail with my e-mail address... doesn't send the form.

Any help with be greatly appreciated.

Thanks
Matt :thumbsup:

Racer
03-15-2005, 04:05 AM
I still can't get it to submit the details. :confused:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum