Re: onChange js running a php function

From: Date: Wed, 12 Oct 2005 20:35:07 +0000
Subject: Re: onChange js running a php function
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-223985@lists.php.net to get a copy of this message
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

« previous php.general (#223985) next »