Shoutbox

[?] xmlhttp POST - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: [?] xmlhttp POST (/showthread.php?tid=69078)

[?] xmlhttp POST by Spunky on 12-02-2006 at 06:25 PM

I'm trying to send variables with POST, but only have them as a query string at the moment... How would I be able to send them?


RE: [?] xmlhttp POST by -dt- on 12-02-2006 at 06:58 PM

code:
var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
xmlhttp.open("POST", url, true);
xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xmlhttp.onreadystatechange = function() {
    if (xmlhttp.readyState==4) {
        if(xmlhttp.status == 200){
            //worked                   
        }else{
            //error   
   
        }
    }
}

xmlhttp.send("moo=xxx&cow=eksdf");