View Full Version : Need to dynamically update form fields

07-01-2005, 06:31 AM
Hi all,

I have a situation where I have a PHP app that generates a page/form for the user. The page will have a dropdown that will be populated based on data retrieved from an external source. When an item in that dropdown is selected, I need to retrieve another external data set, parse it and populate the second dropdown with the results.

Can't use it all statically as the external data might change.

Can I do this in Javascript - retrieve an external data set (html page) based on a user selection, parse it and populate another dropdown?


07-01-2005, 07:31 AM
Search for "double combo javascript" in google. PHP should generate all the data in a javascript array. So you should load all the data at once. If the data is too large, other alternative is this (http://www.ashleyit.com/rs/jsrs/select/php/select.php).