Page 1 of 1

Loading data in a combobox from a db with local filtering

Posted: Tue Sep 15, 2009 11:48 pm
by vinaynahata
Hi ,

I want to populate a combobox with data pulled from a mysql db . The value of second combobox depends on what's been selected in first combobox. I assume pulling the data completely when loading the combobox and then filtering it locally to populate the second combobox based on the selection in first combobox will suit my needs so that i do not have to query server.What is the best way of doing it?Any free javascript library which can make my job easier?Further any sample code snippet would be appreciated as i am a newbee in javascript/php.

Re: Loading data in a combobox from a db with local filtering

Posted: Wed Sep 16, 2009 1:28 am
by CoderGoblin
Dynamic/Chained Selects using Ajax Prototype/JQuery gives one example although not sure how up-to-date it is. The phrase you need to look for via your favourite search engine is Dynamic or Chained Selects.