how use a listbox for select items beetween 3 lists?
i want select 3 categories using 3 listboxes
like this picture show
how can i do that?
thanks for your help
I'm assuming you mean each <select> would be updated based on the value selected in the one before. In this case it is usually done these days using AJAX, the server side component of which is usually something like a PHP script which returns the values corresponding to the previous selection. You can do this relatively easily using jQuery or another framework with AJAX functions (or youcould write your own but in all honestly there's not much point when it's been done for you already).
yes is thats what i want i have searched for examples but without sucess
can you point some samples
thanks a lot for your help
Well I don't know which scripting language you intend to use on your server, or where the information is coming from to populate the list boxes, so it's hard to give you any pointers on that side of things, but a good place to start would be the jQuery AJAX documentation. I would recommend jQuery for handling the client side of your program because it has built in functionality for everything you will need to do.
i using php and the list info is stored in a mysql db
Let's assume (just for fun) that AJAX is not an option for you ;-)
Saw an example on a German domain site: http://www.fh54.de/js/cascadingselects/
Another at http://webdeveloper.earthweb.com/web...item.php/91311
Last edited by javawebdog; 11-30-2008 at 01:32 PM.
Reason: add another resource
hi the samples works fine but i looking for a listbox not a combo list the way is the same? thanks
Same problem. The difference between a combo box and list box is the size attribute.
Typically combo are <select size="1"> if no size is supplied "1" is the default. A list box is just a select where the size=>the number of expected items.
That said the since they both use the same html elements they have the same behaviors and constraints.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)