Aug 2 2008
Ajax using post
- 1 Comment
If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!
Here is a sample code which uses POST method in XMLHTTP request.
var url="ajaxpage.php"; var parms="name=bobby"; //Parameters xmlHttp.open("POST", url, true); xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlHttp.setRequestHeader("Content-length", parms.length); xmlHttp.setRequestHeader("Connection", "close"); xmlHttp.onreadystatechange = function() { //On ready state execute the below code if(http.readyState == 4 || http.status == 200) { alert(xmlHttp.responseText); } } xmlHttp.send(parms);
|
|
|
|
|
![]() |
1 Comments on this post
Trackbacks
-
Binny V A said:
I have written a small post on Ajax using post. Take a look.September 21st, 2008 at 12:55 am

