I have 2 combo boxes, one for category and one for type. On start the category combo box includes a list of all categories, i.e. books, video, music, dvd. the type combo box includes nothing. Once a category form the combo box has been selected, the type combo box gets populated with the specific types for that category. Anyone know how to do this???
When you say combo box do you mean the select option form list? If so then yes I know how to do this.
Better to do it in Javascript and avoid the page refreshes. Use PHP to build the Javascript lists. http://www.felgall.com/jstip22.htm <-- a good tutorial on it
Thats almost exactly what I had as well. You could use some css to hide the list that doesnt have anything until the first list has been selected
cascading style sheets http://www.w3schools.com/css/default.asp It helps you layout the html on your webpages and you can use it to hide unwanted code.
I do this in several spots. You need to build up a js array for each selection list. Then on the onclick event of the first box you fill the contents of the second box with appropriate js array. When I get to work I'll post the js I construct from php and the code I use to construct it.
If you need to query the database to get the results for the first list a technique like I use here may be useful but these days people use AJAX.