RE: dynamic lists

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Jay Blanchard [mailto:jblanchard@xxxxxxxxxx] 
> Sent: Wednesday, January 17, 2007 4:05 PM
> To: Don; php-general@xxxxxxxxxxxxx
> Subject: RE:  dynamic lists
> 
> [snip]
> By dynamic drop list I mean the type where the options 
> contained in the subsequent list depend on what was picked in 
> the previous list without clicking submit. 
> [/snip]
> 
> PHP is server side, you need to do this with AJAX or Javascript
> 
> --
> PHP General Mailing List (http://www.php.net/) To 
> unsubscribe, visit: http://www.php.net/unsub.php
> 

Don,

There's a few different ways to do this.

#1) Submit the form (to itself) when a user chooses an option from the first
list (using onChange=form.submit()) then with PHP query the database for the
second set of options.

#2) Use JavaScript to store all the values and pop them in when the user
chooses an option from the first list (using onChange=someFunction(...)).

I like #2.  If you need a starting point, google for "javascript dynamic
select list"

Hope that helps,

Brad

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux