GregL83 Posted September 19, 2007 Share Posted September 19, 2007 I want to create a form with menu options that dynamically affect other options. An example is a menu listing states and cities. When the state is selected the corresponding cities are loaded into the next associated menu. I already know how to do a simple form of this; however, I would like to make it more complex. (tutorial : www.hscripts.com/scripts/JavaScript/dynamic-form-event.php). Would it be possible to have the first selected value pull more values from a MYSQL DB using PHP? Or, will I be required to pull all the corresponding values first and echo them in javascript like demonsrated in the tutorial linked in paranthesis above^ ? Thank you for your time... Link to comment Share on other sites More sharing options...
justsomeguy Posted September 19, 2007 Share Posted September 19, 2007 You can use AJAX to have Javascript send a request to a PHP script telling it which item was selected and the PHP script could determine the list of options for the second dropdown and send that list back to Javascript, which would update the element on the page. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.