Jump to content

AJAX page via IE requires F5 on load


codecomm

Recommended Posts

I have an html page with a FLASH header.

 

If I open the web page w/in IE, then I have to hit F5.

 

If I open the web page w/in FireFox, then it opens fine and I get my data table build via my AJAX call:

 

<script type="text/javascript">

function ajaxFunction(qry){

var xmlHttp;

try{

xmlHttp=new XMLHttpRequest();

}

catch(e){

try{

xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");

}

catch(e){

try{

xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");

}

catch(e){

alert("Your browser does not support AJAX!");

return false;

}

}

}

 

xmlHttp.onreadystatechange=function(){

if(xmlHttp.readyState==4){

document.getElementById("contentAJAX").style.background = "#FFF";

document.getElementById("contentAJAX").style.border = "none";

document.getElementById("contentAJAX").style.padding = "0";

document.getElementById("contentAJAX").innerHTML=xmlHttp.responseText;

}

}

 

document.getElementById("contentAJAX").style.background = "#DDD";

document.getElementById("contentAJAX").style.border = "1px solid #333";

document.getElementById("contentAJAX").style.padding = "50px 0";

document.getElementById("contentAJAX").innerHTML="<b>Loading...</b><br><br><img src='ajax-loader.gif' />";

 

xmlHttp.open("GET","proxy.asp?qry="+qry,true);

xmlHttp.send(null);

//alert("Sent");

}

Link to comment
Share on other sites

You need to append a random number as an addition get parameter on the end of your url (it will be unused in your script), so that each http request looks like a unique request so that the browser will actually make the request to the server.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.