PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Tue Sep 26, 2017 6:11 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Tue Dec 03, 2013 12:37 pm 
Offline
Forum Newbie

Joined: Thu Oct 31, 2013 10:50 am
Posts: 24
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?


Top
 Profile  
 
PostPosted: Wed Dec 04, 2013 10:41 pm 
Offline
Site Administrator
User avatar

Joined: Wed Aug 25, 2004 7:54 pm
Posts: 13431
Location: New York, NY, US
I think Ajax is probably the best way to generate sub-<select>s

_________________
(#10850)


Top
 Profile  
 
PostPosted: Mon Dec 09, 2013 1:01 pm 
Offline
Forum Newbie

Joined: Mon Dec 09, 2013 11:52 am
Posts: 18
Hi
Try look on the net for: "Multiple select dropdawn with ajax" , there are some good tutorials and script to make those select lists.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group