function createXHR() { var request = false; try { request = new ActiveXObject('Msxml2.XMLHTTP'); } catch (err2) { try { request = new ActiveXObject('Microsoft.XMLHTTP'); } catch (err3) { try { request = new XMLHttpRequest(); } catch (err1) { request = false; } } } return request; } function Write(url, content) // url is the script and data is a string of parameters { // alert ("About to create xhr"); var xhr = createXHR(); xhr.onreadystatechange=function() { if(xhr.readyState == 4) { // alert ("Status is " + xhr.status); // alert (xhr.statusText); // alert("sent " + url + " " + content); } }; // alert ("Created function; About to create post"); xhr.open("POST", url, true); // alert ("Done post; About to send request header"); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); // alert ("Sent request header; About to send"); xhr.send(content); // alert ("Sent"); } function submitForm(doc) { paramstring = 'firstName=' + doc.getElementById('q3758').value + "&" + "lastName=" + doc.getElementById('q3761').value; paramstring += ('&' + 'email=' + doc.getElementById('q3770').value); paramstring += ('&' + 'objection=' + doc.getElementById('q3779').value); paramstring = encodeURI(paramstring); Write("http://www.hastingsalliance.com/SaveObjection", paramstring); }