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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:06:26+00:00 2026-05-31T19:06:26+00:00

I have an inherently complicated page designed by an idot running a script on

  • 0

I have an inherently complicated page designed by an idot running a script on load that takes too much time and generates the Stop Script dialog box.

The page works fine on all tested browsers except IE6/7/8.

I would like to know if I can break up the script with settimeouts to avoid this error.

Something like: $(‘.level’).each(f(){settimeout(f(){script},1)});

Update: Yes of course I knew everyone would want to see code, but it’s big too. Perhaps this line will indicate the idea of what’s happening at the top level of the onload:

    $('#thetable').find('tr.listing :checkbox').click(function(event) { ... });

where there are around 5700 dom nodes in #thetable in one of the more modest sets of search results.

  • 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-31T19:06:28+00:00Added an answer on May 31, 2026 at 7:06 pm

    I think the search on this selector $(‘#thetable’).find(‘tr.listing :checkbox’) is what is taking the time in IE.

    There are a couple things you could do…

    It sounds like your showing a result set in a table. In this case you may want to implement paging and have the script go back to the server for more results on the page change event. This will mean less DOM nodes to process, and should take care of the stop script problem.

    Another approach you could try is giving your check boxes predictable ID’s and then doing a direct select such as $(“#thetable_checkbox_” + checkboxid) and then having a forloop iterate through the results, changing the checkboxid you are selecting on.

    Here is some pseudocode as an example

    for (int x = 0; x < numResults; x++) {
        setTimeout(function() {
            $("#thetable_checkbox_" + x).bind(function() {
                 clickEventFunction()
            });
         }, 0);
     }
    

    Where your checkbox ID’s have been generated on with ID’s like thetable_checkbox_1 etc.

    The approach you mentioned for breaking up the script with setTimeout will also work, but you need to avoid jQuery selectors that could take a long time. You can also set the timeout value to 0 since you want it to run as soon as the browser is ready. Setting the timeout to 0 yeilds to the browser and allows it to run any operations it has pending before returning to your script. If the script is long running you should display a modal loading dialog so that the page is only displayed to the user when it is ready.

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

Sidebar

Related Questions

I have a thread that updates it's state from time to time and I
Have a SomeLib.pro file that contains: CONFIG += debug TEMPLATE = lib TARGET =
Have a matrix report now that has Position, Hours and Wages for a location
I have the following classes: Defect - represents a type of data that can
I have a long-running process where, due to a bug, a trivial/expendable thread is
I have the following routine that dumps a DataTable into an Excel worksheet. private
We currently have an application that starts its own background services to manage syncing
I have a query which uses a complicated set of CASE statements, some nested,
I have a C++ class hierarchy that looks something like this: class A; class
Each time I have seen the catch all statement: try { // some code

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.