Dynamic Drop-Downs

They have: 330 posts

Joined: Apr 2000

I am sure this is a popular request but I need help creating dynamic drop-down menus.

I believe I know the basic idea but I'm not good enough at javascript to write these on my own.

I have 5 drop-down boxes. The 1st one will change the options for the 2nd and 3rd one immediately when it's been changed. The 4th one will change the 5th options.

What is the proper procedure for this?

I know I need a function in the head... right?

<?php
&lt;script langauge=\"javascript\"&gt;
function Option1Check()
{
Code explaining opening DB where Option2.Option1Value = Option1.Value
}
&lt;/script&gt;
?>

and I need to call it onChange... right?
<?php
<select name=\"Option1\" onChance=\"return Option1Check()\">
...
</select>
?>

Thanks for any help.

Vincent Puglia's picture

They have: 634 posts

Joined: Dec 1999

Hi artsapimp,

see the two "Cascading Selects" script/tutorials at my site (GrassBlade). They should point you in the right direction.

Vinny

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.