Posted By

1man on 03/12/07


Tagged

ajax post request book


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

vali29
korzhik
wirenaught


Ajax Post Request


 / Published in: JavaScript
 

Simple Ajax POST request using the getHTTPObject function.

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

Report this snippet  

You need to login to post a comment.