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

  • SEARCH
  • Home
  • 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 7668191
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T15:17:54+00:00 2026-05-31T15:17:54+00:00

I have to execute particular code every 1 minute, I have coded like this.

  • 0

I have to execute particular code every 1 minute, I have coded like this. Below code is working in all browsers except in IE.
Issue is: ../common/ajaxpage.aspx is hitting very first time,from the next time is not hitting but timedcount is calling for every 1 minute and variable “data” returns “not elapsed” every time even though ajaxpage.aspx is not called.

var gt_t;
$(document).ready(function () {
    gt_t = setTimeout('timedCount()', 60000);
    OnSaveBtnFix();
    OnStart();
    alert(gt_t);
});

    function timedCount() {
        alert("timed count started");
        $.get('../common/AjaxPage.aspx', { action: 'sessionexp', TypeID: 'ClientID' }, function (data) {
            alert(data);
            if (data == "Elapsed") {
                dispalySessionPopup();
                gt_t = setTimeout('timedCount()', 60000);
            }
            else if (data == "null") {
                hidePopup('popupMsg');
                document.location.href = "../Index.aspx?logout=y";
            }
            else {                   
                gt_t = setTimeout('timedCount()', 60000);
            }
        });
    }
  • 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-31T15:17:55+00:00Added an answer on May 31, 2026 at 3:17 pm

    IE is probably caching your request. You can convert your $.get call into a $.ajax call and use the cache option. jQuery will add a timestamp to the end of the request, forcing the browser to make a fresh request:

    $.ajax({
        type: 'GET',
        url: '../common/AjaxPage.aspx',
        data: { action: 'sessionexp', TypeID: 'ClientID' },
        cache: false, // no caching
        success: function (data) { .... }
    });
    

    As a side note, it is considered a best-practice to use the version of setTimeout that takes a function reference, not a string. In other words:

    gt_t = setTimeout('timedCount()', 60000);
    

    could/should be rewritten:

    gt_t = setTimeout(timedCount, 60000);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my code behind I have the code below to execute an insert command.
I have a repeatable business process that I execute every week as part of
I have the following Python code: cursor.execute("INSERT INTO table VALUES var1, var2, var3,") where
I have a plugin that uses the .live method (now deprecated) to execute code
i have written this code to convert the current system date and time to
I would like to execute a callback after a particular div gets removed. I
I have some PHP code that was at one point WORKING FINE. It makes
I have this part of code in my application. card.getcard(command, function(toproceed,resultscard) { console.log('entry other
I have a script. I need to execute a particular command only for the
i am having a internet / security issue with some code i have written.

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.