Dynamic Drop Down List ( Jumping Menu )

They have: 45 posts

Joined: Jun 2009

Hey everyone,

i am trying to create a list menu, for a automobile website in which you search a model by first selecting a year from the drop down list and then in the next drop down list you select the make/model and then press go to go to the particular page of that model/make .
I did not use PHP because i dont know it .
------------------------below is to give you and idea -----------------

I have made them in a form but cant get to work....

<head>
<script type="text/javascript">
<!--
function MM_jumpMenuGo(objId,targ,restore){ //v9.0
  var selObj = null;  with (document) {
  if (getElementById) selObj = getElementById(objId);
  if (selObj) eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0; }
}
//-->
</script>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
  <label for="select">Model</label>
  <select name="select" id="select" accesskey="M" tabindex="1">
    <option value="volvo">Volvo</option>
    <option value="alfa" selected="selected">Alfa Romeo</option>
    <option value="nissan">Nissan</option>
    <option value="benz">Mercedes</option>
  </select>
  <select name="jumpMenu2" id="jumpMenu2">
    <option value="2009">2009</option>
    <option value="2008">2008</option>
  </select>
  <input type="button" name="go_button2" id= "go_button2" value="Go" onclick="MM_jumpMenuGo('jumpMenu2','parent',0)" />
</form>
</body>

He has: 629 posts

Joined: May 2007

I'm not sure why you'd use such a complicated solution to what seems to me a simple problem? If I were you, I'd simply have a list of links with all possible combinations of make and model year, each link pointing to the appropriate page. Easier to code; easier to use; and does not depend on JavaScript...

Perhaps there's more to this than I imagine?

Cordially, David
--
delete from internet where user_agent="MSIE" and version < 8;

They have: 45 posts

Joined: Jun 2009

because i want the visitor to go to the exact car model with the exact year they select from the list .

if you have a simpler solution please advice me with it .

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.