Ajax Tutorial: Dynamic Loading of ComboBox using jQuery and Ajax in PHP

Here is a script for beginners to create a dynamic loading of dropdown. Simple solution which is created by jQuery.
Table Structure
CREATE TABLE IF NOT EXISTS `ajax_categories` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`category` varchar(50) NOT NULL,
`pid` int(11) NOT NULL,
PRIMARY KEY (`id`)
)
get_child_categoires.php
HTML
Select Category
Select Sub Category
67 to “Ajax Tutorial: Dynamic Loading of ComboBox using jQuery and Ajax in PHP”
Post comment

Categories
- AJAX (28)
- Announcement (3)
- Blogging Tips (1)
- Codeigniter (16)
- CSS (14)
- Facebook (8)
- Freelance Tips (1)
- How-To (2)
- Joomla (1)
- JQuery (51)
- Miscellaneous (3)
- Mootools (1)
- MySQL (3)
- PHP (57)
- SEO (2)
- Technology (6)
- Tutorials (17)
- Twitter (2)
- Web Design (26)
- Web Development (58)
- WordPress (3)
Popular post
- 46 Highly Responsive Admin Templates for Your Websites
- $50 PayPal Cash & 5 Premium PHP Wall Script Prizes #Giveaway
- PHP Wall Script Clone with Real Time Features __ January 2013 Release __
- Things you should know if you are a Blogger
- Top 10 Must Have Qualities of a Freelance Web Developer
- Fundamental Factors for Mobile Compatible eCommerce Hosting
- Facebook Wall Script New Version in September 2012
Recommend

love it
hi ,thanks, i need to do styles for this select box, it possible?? any tutorial for tht??
thanks a lot.
How can i get sub categories of child?
ex: after select main cat , next combobox show me children’s of it.and how can i show children’s of selected child in combobox?
please help me.thanks
Jazakallah khair (May Allah grant you goodness)
Thanks ZeeShaN! How can I use values, as they have all name=”sub_category”?????? what can separate them from each other?
Thanks Dear
Hello,
Its working fine for me but i’m unable to send the sub category value to mysql after submit can you give me the code please
Regards
Harish
Thanks bro ..
here how to store a sub category contents on data base.. please help me..
thanku…
Maybe there is a problem with the connectivity of the database in your php code
Hi ZeeShaN,
Its perfectly working for me.
It help me for my website.
Thanks a lot…….
Hi, the script works fine in Chrome and Firefox, but in IE9 32 and 64 bit the select sub category doesn’t appear and the “working” symbol keeps rolling around.
Using your demo on the internet the script works ok though.
Anything I can look at?
Thanks
Paul Godfrey
thanks men
Same issue than Godders. Part 1 and Part 2 works fine in Firefox, but both desn’t in IE … Could you help please ?
how to save the value of 2nd combo box? any suggestion?
hello it works fine but it cannot save the value of second combo box to mysql using PHP .
Thank you very much.
Hi,
I have created the dropdown with the categories and subcategories, like in the example. But, how can I show the results in the content area of my site?
Thanks.