Page 1 of 1

Selecting categories using select html

Posted: Tue Dec 03, 2013 11:37 am
by bagi
Hello all,
I'm creating an internet shop and when an user will add a stuff, he will select category. I think that create <optgroup> is bad idea (you understand why). Because I wanna create <select> where user will choose general category and after that near with selected category should shows other select with subcategories (if they are). And i have two ways to do it
1) Create first select using php and after create others using javascript ajax (request from server subcategories)
2) Using php output into page all categories and after choosing general category, somehow create select with subcategories

What do u think? Or there is an another better way?

Re: Selecting categories using select html

Posted: Wed Dec 04, 2013 9:41 pm
by Christopher
I think Ajax is probably the best way to generate sub-<select>s

Re: Selecting categories using select html

Posted: Mon Dec 09, 2013 12:01 pm
by CoursesWeb
Hi
Try look on the net for: "Multiple select dropdawn with ajax" , there are some good tutorials and script to make those select lists.