You are here: Re: [PHP] Rasmus' 30 second AJAX Tutorial - [was Re: [PHP] AJAX & PHP] « PHP « IT news, forums, messages
Re: [PHP] Rasmus' 30 second AJAX Tutorial - [was Re: [PHP] AJAX & PHP]

Posted by Rasmus Lerdorf on 07/23/05 18:43

Chris Boget wrote:
>>function sndReq(action) {
>> http.open('get', 'rpc.php?action='+action);
>> http.onreadystatechange = handleResponse;
>> http.send(null);
>>}
>
>
> So with AJAX, the data gets sent back to the browser using GET?
> Is there any way you can do it using POST?

The prototype for the http.open method looks like this:

open("method","URL",async,"uname","pswd")

So to do a POST request instead, just use 'post' instead of 'get' in the
first argument. Then put the url encoded post data in the http.send() call.

-Rasmus

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация