laxi Posted September 17, 2013 Share Posted September 17, 2013 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 https://forums.phpfreaks.com/topic/282221-triple-select-list-box-generator-for-form-not-working/ Share on other sites More sharing options...
laxi Posted September 17, 2013 Author Share Posted September 17, 2013 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 https://forums.phpfreaks.com/topic/282221-triple-select-list-box-generator-for-form-not-working/#findComment-1449868 Share on other sites More sharing options...
fastsol Posted September 17, 2013 Share Posted September 17, 2013 I have a tutorial on this http://amecms.com/article/Building-Chained-Select-Boxes-with-Jquery-and-PHP Link to comment https://forums.phpfreaks.com/topic/282221-triple-select-list-box-generator-for-form-not-working/#findComment-1449874 Share on other sites More sharing options...
priyankagound Posted September 18, 2013 Share Posted September 18, 2013 Try out with the below given example: Step 1: Insert the below into the <HEAD> section of your page: <script type="text/javascript"> /* Triple Combo Script Credit By Philip M: http://www.codingforums.com/member.php?u=186 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 2: Insert 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 https://forums.phpfreaks.com/topic/282221-triple-select-list-box-generator-for-form-not-working/#findComment-1450023 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.