Jump to content

triple select list box generator for form not working


laxi

Recommended Posts

Hello everyone,

 

I have been having trouble in getting 3 dynamic select list boxes in my form to work properly(without page refresh).

 

I finally found a Jquery double or triple dropdown list generator @ http://dailyphp.blogspot.com/

 

It works to an extend but i think the first select list box is not connected to the 3 list box. They are not in sync.

 

Can some one take a look at my code and help me get all my list boxes to sync.

 

Also, I want to add the (text)  "category" , "first-subcategory", "second-subcategory" in front of the respective list box when displayed at the front end and I wanted the selected items values to be captured from these list boxes and passed to an other variable "categories","first-subcategories","second-subcategories"(all plurals) respectively so that the I could parse the form to a php script on submit and capture all user inputs into my database table.

 

Thanks in advance :-)

 

index.php

select.php

jquery.txt

Link to comment
Share on other sites

http://www.allplaybig.com/

Hello everyone,

 

I have been having trouble in getting 3 dynamic select list boxes in my form to work properly(without page refresh).

 

I finally found a Jquery double or triple dropdown list generator @ http://dailyphp.blogspot.com/

 

It works to an extend but i think the first select list box is not connected to the 3 list box. They are not in sync.

 

Can some one take a look at my code and help me get all my list boxes to sync.

 

Also, I want to add the (text)  "category" , "first-subcategory", "second-subcategory" in front of the respective list box when displayed at the front end and I wanted the selected items values to be captured from these list boxes and passed to an other variable "categories","first-subcategories","second-subcategories"(all plurals) respectively so that the I could parse the form to a php script on submit and capture all user inputs into my database table.

 

Thanks in advance :-)

Please check my issue @ http://www.allplaybig.com/

Link to comment
Share on other sites

Try out with the below given example:

 

Step 1Insert the below into the <HEAD> section of your page:

<script type="text/javascript">
 
/*
Triple Combo Script Credit
Visit http://javascriptkit.com for this and over 400+ other scripts
*/

 

There are two variables within the script (near the top) you can customize.

 

Step 2Insert the below sample triple combo box the <body> section of your page:

 

<form name="tripleplay" action="">

<select name='List1' onchange="fillSelect(this.value,this.form['List2'])">
<option selected>Make a selection</option>
</select>
 
<select name='List2' onchange="fillSelect(this.value,this.form['List3'])">
<option selected>Make a selection</option>
</select>
 
Follow the logic laid out in the code of Step 1 to customize the contents of each SELECT list.
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.