[Project_owners] XMLHttpRequest() object

Pete Collins pete at mozdev.org
Thu Sep 11 10:49:58 EDT 2003


Doron Rosenberg wrote:
> XMLHttpRequest is asyncronous by default, so do this:
> 
> p.open("POST", "http://xxx.yyy.com/process.php", *true*);
> var myResult = p.responseXML
> 
> or if you want it to be async, do
> p.onload=myfunc
> before the open();

You can take a lool at jslib which wraps this stuff up.

   http://jslib.mozdev.org/libraries/network/http.html

--pete


> 
> 
> 
> Biju G C wrote:
> 
>>Hi,
>>
>>  using XMLHttpRequest() object
>>  how can "POST" some information to a PHP script
>>  and how do i retrieve that info in PHP script.
>>
>>I tried following.
>>   var p = new XMLHttpRequest();
>>   p.open("POST", "http://xxx.yyy.com/process.php", false);
>>   p.send("code=aaaa");
>>but, I was not able to capture data in php script
>>
>>PS:  I was able to send data as query string.
>>   var p = new XMLHttpRequest();
>>   p.open("POST", "http://xxx.yyy.com/process.php?code=aaaa", false);
>>   p.send(null);
>>
>>Thanks in advance.
>>
>>
>>________________________________________________________________________
>>Want to chat instantly with your online friends?  Get the FREE Yahoo!
>>Messenger http://mail.messenger.yahoo.co.uk
>>_______________________________________________
>>Project_owners mailing list
>>Project_owners at mozdev.org
>>http://mozdev.org/mailman/listinfo/project_owners
>>  
>>
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Project_owners mailing list
> Project_owners at mozdev.org
> http://mozdev.org/mailman/listinfo/project_owners


-- 
Pete Collins
www.mozdev.org
www.mozdevgroup.com




More information about the Project_owners mailing list