Jump to content

Dynamic menus


Stickybomb

Recommended Posts

Not sure if this is where this question belongs but here goes

 

I have a list of products that I want display in a drop dpwn menu.

 

each product is available in different sizes that range from 6 to 12

 

not all the products come in all of the sizes

 

Exp.

 

product1 - 6,9,11

product2 - 7

product3 - 8,9

product4 - 12,6

product5 - 7,8,9,10

 

and so on!

 

like so

<form action="" method="post" name="request">
<select name="product" size="20">
	<option value="product1">product1</option>
	<option value="product2">product2</option>
	<option value="product3">product3</option>
	<option value="product4">product4</option>
	<option value="product5">product5</option>
	<option value="product6">product6</option>

</select>

<select name="size" size="10">
	<option value="6">Sentry</option>
	<option value="7">Sherwood</option>
	<option value="8">Tuscan</option>
	<option value="9">Vanguard</option>
	<option value="10">Victorian</option>
	<option value="11">Virginian</option>
	<option value="12">Wellington</option>
</select>
</form>

I have a seperate drop down for the sizes but I only want to show the sizez availble for the selected product in the drop down.

 

Without having to refresh the page when i change the product in the other drop down.

 

like if I selected product one in the first menu the second menu would only show me 6, 9, and 11 as choices.

 

sorry if its newbish Im trying to learn the basics, Im new to the whole ajax scene and was wondering if it is needed for this, and if so how its done

 

 

 

also any links to some good beginner tutorials would help

 

Thks

 

Stickybomb*

Link to comment
Share on other sites

Stickybomb,

 

Don't know if you use PHP, but if so, you can use the code found here:

 

http://www.phpclasses.org/browse/package/3594.html ( Class: AJAX Drop-down ).

 

Even if you don't, most of the PHP is MySQL related, and you can probably figure out how to make it work with just JS and HTML.

 

I will try myself to do just that.

 

If I get it to work without PHP, I will post back here.

 

 

Scot L. Diddle, Richmond VA

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.