Re: AJAX & PHP
| From: | Brent Baisley | Date: | Thu, 21 Jul 2005 12:41:13 +0000 |
| Subject: | Re: AJAX & PHP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-219109@lists.php.net to get a copy of this message | ||
Started playing with it about two months and have now integrated it into my project. Makes things a lot easier and much more dynamic. No more round trips to the server just to mark an action as completed or other simple things that normally required a refresh. You can do dynamic lookups based on what's entered in a field, without having to download all the information in javascript variables. A big bonus is that communication with the server can be done asynchronously, so the user still has complete control while you're doing lookups or whatever.
I found it extremely simple to implement, although I'm returning text strings at the moment instead of XML. Not completely up to speed on parsing XML in javascript.
You just pass a URL to the server, which would be a PHP file along with parameters. The only thing PHP is doing is 'echo'ing some data back to the client. A javascript function can then do something with that data. So you do need to have some javascript skills.
The xmlHttpPost function I use I found on O'Reilly:
http://www.onlamp.com/pub/a/onlamp/2005/05/19/xmlhttprequest.html
On Jul 21, 2005, at 1:52 AM, balwant singh wrote:
Have anybody tried PHP & AJAX, may please share your experience. also pls. suggest good link of tutorial on this. With Best Wishes Balwant Singh --PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php-- Brent Baisley Systems Architect Landover Associates, Inc. Search & Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577