Re: onChange js running a php function

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

 



On Tue, October 11, 2005 3:11 pm, Dan McCullough wrote:
> Its been awhile since I tried this so I was wondering if anyone had
> any luck with this.
>
> I need to get a list of tables from a database, which means I have to
> run a function, I would like to have an onChange event run when I
> change my selection in a select menu, that would send the value for
> the select menu to a php function.
> can that be done?

Yes, but...

You can do it with XmlHttpRequest, or even just changing your
"location" in JavaScript.

But...

A) This doesn't really make any difference to the PHP code -- It's all
in the JS, so you should probably research in JS forums.

B) It's going to be DOG-SLOW if every menu change has to make a
round-trip to the web server and get stuff from the database, unless
it's a limited install on a LAN or other high-speed-only network.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
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