Tag Archives: XMLHttpRequest

Posted in Uncategorized | Tagged , , | Leave a comment

Using the XMLHttpRequest

Using the XML HTTP Request object.

Posted in Uncategorized | Tagged | Leave a comment

JavaScript – XMLHttpRequest functions

JavaScript – XMLHttpRequest functions. function sendRequest(url,callback,postData) { var req = createXMLHTTPObject(); if (!req) return; var method = (postData) ? “POST” : “GET”; req.open(method,url,true); req.setRequestHeader(‘User-Agent’,’XMLHTTP/1.0′); if (postData) req.setRequestHeader(‘Content-type’,’application/x-www-form-urlencoded’); req.onreadystatechange = function () { if (req.readyState != 4) return; if (req.status != … Continue reading

Posted in Code Snippets | Tagged | Leave a comment