View Full Version : Question regarding dynamic pop-down lists

11-08-2004, 05:31 PM

I have a task to do using PHP, Javascript, HTML and Oracle.

I have two pop-down lists, for the first list the value comes from Oracle database using PHP. Now depending on the value selected in the first list, the second list will have more information about that particular value. For e.g. If my first list has 'USA','INDIA',,'CHINA' as the choices and a user selects 'USA' the second list will give states of USA , if a user selects 'INDIA' the second list will give states of INDIA.

The states will be stored in Oracle. Can someone please tell me how to do this?
Only using Javascript I knw, but thn when the value comes from database in PHP how can I do this?

Any help is highly appreciated.

11-08-2004, 05:53 PM
two choices,

Choice 1: You need to do some sort of post back to the server with the onchange event to populate the second field.

Choice 2: You write out all of the options initially into javascript arrays and you use a double combo script that you can find on http://www.javascriptkit.com

Choice 1 is good if you have 10000's of records. Choice 2 is good if you have a smaller amount of records.


11-08-2004, 06:01 PM
thnx for ur reply,

well does this mean that if i need to generate a dynamic list using database and javascript I cannot do that?

Posting the form to itself is not an option for this and so would need some other way to get the records from database and display dynamically using javascript or php-- donno?


11-28-2015, 05:09 AM
Hi can i use dynamic pop to my site: Page not found - IndianBestDeals (http://www.indianbestdeals.in/(IndianBestDeals) : Mobiles Deals, Coupons, Discounts, Promo codes). If its is please let me know thank you :)

11-28-2015, 05:22 AM
Yes, you may. But you are better off starting your own thread instead of resurrecting one that is 11 years old