Page 1 of 1

Need Help: Drop down script like country- state

Posted: Thu Dec 25, 2008 11:27 pm
by rajsekar2u
Hi guys...
Am creating a form in that am using two drop down list box's named category and subcategory
If i select an option from category drop down list, the corresponding values should show in the subcategory dropdown list...
I need to take both the values from database....

thanks in advance

Re: Need Help: Drop down script like country- state

Posted: Fri Dec 26, 2008 7:23 am
by jaoudestudios
Sounds like you have the right idea!

Re: Need Help: Drop down script like country- state

Posted: Fri Dec 26, 2008 11:46 am
by jayshields
You haven't posted a question. I'm assuming you just want us to make a script for you.

It can be done purely with PHP, if you don't mind damaging the user experience by requiring a page refresh after the first value has been chosen. Ideally, you'll want to use JavaScript, and possibly AJAX. I would stay away from AJAX for something this simple, and do it by fetching all the cats and subcats (this could become infeasible if you have a very large data set, and then you'd think about AJAX), and then just using Javascript to show the necessary subcats upon cat choice.

Re: Need Help: Drop down script like country- state

Posted: Sat Dec 27, 2008 4:16 am
by rajsekar2u
No... Just want to know which method to use for this..
i tried javascript but i cant get the result...