Dynamic dropdown lists (select)

From: Date: Fri, 04 Apr 2008 10:51:43 +0000
Subject: Dynamic dropdown lists (select)
Groups: php.general 
Request: Send a blank email to php-general+get-272517@lists.php.net to get a copy of this message
Hi all, I am looking at options for creating a dynamic dropdown list. Ok here is the scenario: All values in the dropdown list (select/option field) are coming from the database. So there will be 2 dropdown lists. First one say gets (for example) a list of cars, Then once the car is choosen the second list is populated with the list of models for the car choosen. I would like to know if its possible to do this without posting as well as without the use of JS. I have seen js examples where the values are all stored in arrays. This is not desireable as I will be getting the values from the the DB using PHP, unless I can write the JS values to the arrays using PHP? Also not sure of that. Is there any other idea or thing I can do? Im thinking maybe AJAX but this is for a mobile site (WAP/xHTML) site and Im not sure if the functionality will work on these devices. Please advise. Thanks in advance Angelo Web: http://www.elemental.co.za

« previous php.general (#272517) next »