scuff Posted November 1, 2008 Share Posted November 1, 2008 Is something like this possible? //Browser Support Code function ajaxFunction(){ var ajaxRequest; // The variable that makes Ajax possible! try{ // Opera 8.0+, Firefox, Safari ajaxRequest = new XMLHttpRequest(); } catch (e){ // Internet Explorer Browsers try{ ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try{ ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e){ // Something went wrong alert("Your browser broke!"); return false; } } } // Create a function that will receive data sent from the server ajaxRequest.onreadystatechange = function(){ if(ajaxRequest.readyState == 4){ document.getElementById('test').innerHTML = ajaxRequest.responseText; } } var file = 'site'; ajaxRequest.open("GET", file, true); var params = "renewer=1"; ajaxRequest2.open('POST', 'site.html', true); ajaxRequest2.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); ajaxRequest2.setRequestHeader("Content-length", params.length); ajaxRequest2.setRequestHeader("Connection", "close"); ajaxRequest2.send(params); } I'm trying to get it to post something to a page and read a page at the same time. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.