Tutorial for ajax form posting

I am looking for a short and easy tutorial for posting form data using ajax & POST. More specifically for comments in a custom wordpress theme.

So far I have only found this: http://www.simonerodriguez.com/ajax-form-submit-example/ but the js file is huge so I think there is a lot of bloat (couldn't decipher it all). I've also searched on this site but most threads use jQuery or do not cover what I'm looking for.

Do any of you know a tutorial for this, or could anyone explain the basic code to me?

Thanks a lot for your help and suggestions!

P.S. please do not suggest jQuery as I am not using it and want to learn pure Js :).

Answers


As I've been asked for it... Here is a quite complete link:

http://www.javascriptkit.com/dhtmltutors/ajaxgetpost.shtml

Cheers, S.


function initiateRequest() 
{
  if(window.XMLHttpRequest) {
        return new XMLHttpRequest();
  } else {
        return new ActiveXObject("Microsoft.XMLHTTP");
  }
}



function createClearingHouse() {

    parameters = "name=" + document.getElementById("username").value;
    url = EnginePath + "/clearingHouse/persist"
    request = initiateRequest();
    request.open("POST", url, false);
    request.send(parameters);
    if(request.readyState==4  && (request.status == 200)) {         
       alert("success");
    }
}

Need Your Help

sql parameters for date and time

sql-server reporting-services

I'm trying to run a query that returns values based on yesterday's date. In this case how many items were shipped out yesterday. This is my query:

How can I programmatically retrieve the details of a 64 bit process in C++?

c++ windows winapi 32bit-64bit

My goal is to get the full command line of a 64 bit process programmatically. I have understood and written this code where I do a process walk of all the currently running processes and get each of