g19max1 Posted October 10, 2010 Share Posted October 10, 2010 Am looking to design a form that deals with items in specific category. Database is working and getting the PHP to set values is not an issue, however I am not sure how to display this form. The form will have one dropdown box that dynamically displays data in the DB. Ok, check thats done. But, when a category is selected, i want another dropdown box to appear on the page without requiring a refresh. This second box will display sub categories. What would i use to make the subcategory box appear when a specific category is selected out of the main box? Quote Link to comment https://forums.phpfreaks.com/topic/215520-category-viewer-php-and-mysql/ Share on other sites More sharing options...
gizmola Posted October 10, 2010 Share Posted October 10, 2010 Take a look at using a javascript library like jquery and make an ajax call to a script you write that when passed a category, returns a list of subcategories. Quote Link to comment https://forums.phpfreaks.com/topic/215520-category-viewer-php-and-mysql/#findComment-1120689 Share on other sites More sharing options...
g19max1 Posted October 10, 2010 Author Share Posted October 10, 2010 Thanks Looks like that is the best option. Would there be anything maybe a little simpler than that? This web app will be running on iOS devices so the lighter the code, the better. Any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/215520-category-viewer-php-and-mysql/#findComment-1120699 Share on other sites More sharing options...
gizmola Posted October 10, 2010 Share Posted October 10, 2010 Not if you want it to not have to do a traditional post. With that said, there's a nice project that should help you out: http://jquerymobile.com/ Quote Link to comment https://forums.phpfreaks.com/topic/215520-category-viewer-php-and-mysql/#findComment-1120705 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.