Re: How to create Dependent Dropdown for state and city?
I used devtoolkit a few times and I suggested it, because is needed almost no programing, just create/adjust
some configuration files.
But once it is not working for you, I can suggest a second approch which I usually do to develop dependet dropdown by myself, but for that, some programming is needed.
1. Create a js file with a function that has 2 steps:
1. Read the value selected in the first dropdown:
eg: document.EditView.field_name.options[document.EditView.field_name.selectedIndex].value
2. Update the options from second dropdown:
eg: document.EditView.field_name.options[document.EditView.field_name.options.length]= new Option("value", "value");
Whether options needs to be loaded from database an ajax call is needed.
2. Include this js file on your form. (editviewdefs.php)
3. Add the function developed in step one in the onchnage event of your first dropdown field)(editviewdefs.php)
Rafael Queiroz Gonçalves
Advanced OMG UML Certified Professional
Sun Certified Enterprise Architect for the Java Platform
Sun Certified Programmer for the Java 2 Platform
IBM Certified Advanced Application Developer - Lotus Notes and Domino
IBM Certified Application Developer - IBM WebSphere Portlet Factory
Computer Science Mastering / UFSC - PPGCC
Bookmarks