Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3394738
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T04:12:21+00:00 2026-05-18T04:12:21+00:00

I have the following script, which is in an external file called at the

  • 0

I have the following script, which is in an external file called at the top of my HTML page. The idea is that I have an Ajax request pinging a database, when the database is updated, the Ajax sees this and calls the function below. It works great in Firefox, but doesn’t work at all in IE. Any suggestions?

var GoPopUp = function(){
  $('#PopNewCall').fadeIn('slow');
  PageRefreshTimer();
}

//Function which refreshes page after a certain number of seconds with no user Inputs
var PageRefreshTimer = function(){
  setTimeout("location.reload(true);",30000); //1,000 = 1 second
}

//Function which refreshes page after user has clicked refresh
var RefreshNow = function(){
  setTimeout("location.reload(true);",0);
}

EDIT: In case anyone is curious, I’m using straight javascript for the ajax. Here it is below. I call it on page load, and then it keeps calling itself in a loop.

function checkRefresh(str)
{
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
 else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
    if (document.getElementById("lastCallID").innerHTML < xmlhttp.responseText)
    {
        setTimeout(GoPopUp(), 100); 
    }
    else
    {
        setTimeout('checkRefresh()',15000)
    }

  }
 }
 xmlhttp.open("GET","getnewid.php",true);
 xmlhttp.send();
 }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T04:12:22+00:00Added an answer on May 18, 2026 at 4:12 am

    This isn’t an answer but you should replace

            setTimeout("location.reload(true);",0);
    

    with

    setTimeout(function(){ location.reload(true) }, 0);
    

    As the former is slow and causes extra-evaluation to take place.

    EDIT #2: Change GoPopUp() to GoPopUp, you might not want to execute it immediately. Same with checkRefresh.

    if (document.getElementById("lastCallID").innerHTML < xmlhttp.responseText)
        {
            setTimeout(GoPopUp, 100); 
        }
        else
        {
            setTimeout(checkRefresh,15000)
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a script that generates a csv file using the following code: header('Content-type:
I have a script that generates a temporary HTML file that has links to
I have the following script which works as long as the are static html
I have the following markup on page load: <select name=sel_billing_address></select> After page load that
I have the following script which works perfectly until I regenerate the links .resultLink
I have the following script which works kind of... $(document).ready(function(){ // add or remove
I have been trying to execute the following UNIX shell script which is not
I have the following script: http://jsfiddle.net/oshirowanen/8mQ7x/1/ Which works fine, but as soon as I
I have the following jquery script, which deals with a query site-visitors enter to
I have a really simple external css stylesheet that has the following : div.hideBox

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.