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?
Selecting categories using select html
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Selecting categories using select html
I think Ajax is probably the best way to generate sub-<select>s
(#10850)
-
CoursesWeb
- Forum Newbie
- Posts: 18
- Joined: Mon Dec 09, 2013 10:52 am
Re: Selecting categories using select html
Hi
Try look on the net for: "Multiple select dropdawn with ajax" , there are some good tutorials and script to make those select lists.
Try look on the net for: "Multiple select dropdawn with ajax" , there are some good tutorials and script to make those select lists.