View Full Version : help needed on listbox
twocool
03-27-2003, 07:14 AM
hi how can i populate a second listbox by jus clicking on a option from a first listbox? records are from a server.. can anyone pls help?
:confused: :confused: :confused: :confused:
http://www.codingforums.com/showthread.php?s=&threadid=16966
:confused: :confused: :confused: :confused:
twocool
03-27-2003, 08:20 AM
hey thanks for the reminder but wat i had earlier was something like i click a button then the 2nd listbox is filled wif records.. but wat i need now is something like i click the option in 1st listbox and it automatically fills the 2nd listbox. it is something like on selectedindexchanged? i am new to this..so i not sure how i am to go abt...
well, that sort a action in clientsided. Most commonly javascript
(onclick="submit()" in the formelementtag). This means you just need to include some javascript when you build the form.
but i don't use it, cause not all users allow javascript + it tends to jump to quick sometimes (for instance, when you click the arrow to view the options) + each click then generates a call to the webserve and database. So each "false hit" will use up resources and in stead of doing your users a favor, you could be ending up annoying them (because responsetimes go up and they can get an list (second dropdown with unexpected/unwanted values)or get nothing at all (if they don't use javascript)
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.