bugskiller
01-01-2009, 05:13 PM
HI,
I have a question about the Chained Selects script- By Xin Yang
I just want to know how I can put one or two select more. The script works fine with the originals 3 select, but when I want to add one more, this last is empty..
The new one should not be automaticly filled but well reset with the 3 others.
Thank you for your help
Didier :confused:
Warning: Please include a link to the DD script in question in your post. See this thread (http://www.dynamicdrive.com/forums/showthread.php?t=6) for the proper posting format when asking a question.
Please post a link to the page on your site that contains the problematic script so we can check it out.
Please include your code so that we can take a look at it, we can't do much without it.
bugskiller
01-02-2009, 10:55 AM
Script : Chained Select
Link : http://www.dynamicdrive.com/dynamicindex1/chainedmenu/index.htm
Here is my question again.
How can I add one "select" when I use this script. I'm not really familiar with JS and when I trie to do it, it renders a "white select"...
I can not give a link to my script because I'm still testing locally. But this is what I do..
In the config.js
addListGroup("vehicles", "car-makers");
addList("car-makers", "Select a maker", "", "dummy-maker");
addList("car-makers", "Toyota", "Toyota", "Toyota");
addList("car-makers", "Honda", "Honda", "Honda");
addList("car-makers", "Chrysler", "Chrysler", "Chrysler", 1);
addList("dummy-maker", "Not available", "", "dummy-car");
addOption("dummy-car", "Not available", "");
addList("Toyota", "Select vehicle type", "", "dummy-toyota");
addList("Toyota", "Cars", "car", "Toyota-Cars");
//-- new select to add
addList("region", "Select your region", "", "dummy-region");
addList("region", "Brussels", "Brussels", "");
addOption("dummy-region", "Not available", "");
In the php page :
<body onLoad="initListGroup('vehicles', document.forms[0].make, document.forms[0].type, document.forms[0].model, document.forms[0].region)">
....
<form>
<table align="center"><tr>
<td>Select a vehicle: </td>
<td><select name="make" style="width:160px;"></select></td>
<td><select name="type" style="width:160px;"></select></td>
<td><select name="model" style="width:160px;"></select></td>
<td><select name="region" style="width:160px;"></select></td>
<td><input type="button" value="Reset" onClick="resetListGroup('vehicles')">
</tr></table>
</form>
So the problem is that the "region" doesn't depend of the cars but should be "reset" at the same time..
thank you
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.