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 4537058
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T14:37:16+00:00 2026-05-21T14:37:16+00:00

I have the following jquery that registers a timer interval to occur every 10

  • 0

I have the following jquery that registers a timer interval to occur every 10 seconds on the webpage whenever an input button called btnExport is clicked.

if ($) {
    $(document).ready(function () {
        $("input[id$='btnExport']").click(function ($e) {
            // javascript timer function
            window.setInterval(ExportProgressCheck, 10000);
        });

        function ExportProgressCheck() {
            $.ajax({
                type: "POST",
                url: "DMZ_Export.aspx/GetExportProgress",
                contentType: "application/json; charset=utf-8",
                data: "",
                dataType: "json",
                success: AjaxSuccess,
                error: AjaxFailed
            });
        }
    });
}

However, under certain scenarios I need the timer interval to begin ticking just as soon as the page load itself is loaded. My problem is that I am not sure how to do this from within the page load event of the codebehind. In theory it would go something like…

protected void Page_Load(object sender, EventArgs e) {
    if (!Page.IsPostBack) {
        if (IsExportInProgress()) {
            // Register the timer interval now!! How do I do this??
            // window.setInterval(ExportProgressCheck, 10000);
            }
        }
    }
}

I tried to accomplish this by registering a startup script, but it doesn’t like the script because it doesn’t know what ExportProgressCheck is…

ClientScriptManager cs = Page.ClientScript;
cs.RegisterStartupScript(cstype, csname1,
    "<script type=\"text/javascript\">window.setInterval(ExportProgressCheck, 10000);</script>",
    false);

Any help on this would be very appreciated! Thanks!

  • 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-21T14:37:17+00:00Added an answer on May 21, 2026 at 2:37 pm

    Pulled this off by going another route. I use jQuery’s $get function to hit another aspx page to get the condition value.

    if ($) {
        $(document).ready(function () {
    
            $.get("ExportInProgCheck.aspx", function (response) {
                if (response != '')
                    window.setInterval(ExportProgressCheck, 10000);
            });
        });
    }
    

    ExportInProgCheck.aspx simply returns ‘true’ if the condition is met, at which point the window.setInterval gets set.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following jQuery event that gets fired every time an anchor is
I have the following jQuery function that I'm using to display a timer on
I have the following jquery that adds a onclick to every image within a
I have the following jquery that pulsates a button link. $('#BtnBoxGreeting').effect('pulsate', { times: 3
I have the following JQuery code that worked perfect in C#/Asp.net 2.0 to call
I have the following jQuery calls chain: $(someSelector).nextUntil(.specialClass).addClass(classBasedSomeSelectorObject) I need to addClass that's value
I am begging to use jquery. I have the following call that works in
In trying to select elements that have any attributes, the following throws a jQuery
I have the following jQuery script that makes an orange transparent hover effect cover
I have the following jQuery method that iterates over a selectlist containing a number

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.