Return to Snippet

Revision: 2578
at March 12, 2007 09:41 by 1man


Initial Code
var request = getHTTPObject();
if(request){
	request.onreadystatechange = doSomething;
	request.open("POST", "file.ext", true);
	request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	request.send("name=whatever+goes+here&message=hello+world");
}

Initial URL

                                

Initial Description
Simple Ajax POST request using the getHTTPObject function.

Initial Title
Ajax Post Request

Initial Tags
ajax, post

Initial Language
JavaScript