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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T08:03:55+00:00 2026-05-31T08:03:55+00:00

This question relates closely to the stack overflow question " window.resize event firing in

  • 0

This question relates closely to the stack overflow question "window.resize event firing in Internet Explorer".

The Issue:
I am attempting to fix a resizing issue in Internet Explorer 8. Currently, the resize function gets called repeatedly causing IE to essentially lock up – the user can no longer use buttons that call Javascript actions.

Previous Attempt(s):

var resizeTimeout;
var resizeHandler = function() {
    clearTimeout(resizeTimeout);
    //$(window).unbind('resize', resizeHandler);
    //window.removeEventListener('resize');
    window.removeEventListener('resize', resizeHandler, false);
    scrollHandler();
    setTimeout("$(window).resize(resizeHandler);", 100);
    return true;
}
//$(window).resize(resizeHandler);
window.addEventListener('resize', resizeHandler, false);

Problems: It appears that window cannot implement addEventListener or removeEventListener and unbinding jQuery doesn’t stop IE from continuing to freak out. It works fine in all other browsers.

Desired Behavior: The goal here is really to get IE to stop repetitively executing code so other functions like onclick events work.


Does anyone know how I can remove the resize event after it’s been added or simply make IE stop being retarded. (<– Extra points if you can make IE not be retarded.)


Resolution: Inside of the scrollHandler function a variable was not declared using the var prefix. Adding var made all the evil fairies go away.

  • 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-31T08:03:57+00:00Added an answer on May 31, 2026 at 8:03 am

    I think you’re going about this the wrong way. What you should be doing is using that timeout to block the invocation of “scrollHandler()” until the window resizing activity has paused for a little while (like the 100ms delay you’re using).

    var resizeTimeout;
    function resizeHandler() {
      cancelTimeout(resizeTimeout);
      resizeTimeout = setTimeout(scrollHandler, 100);
    }
    $(window).resize(resizeHandler);
    

    Trying to do DOM updates (which I assume to be what goes on inside “scrollHandler”) in a “resize” handler is really not a good idea in any browser. By doing that, you won’t need to get rid of the “resize” handler at all.

    edit — OK now I see that that’s effectively what you were trying to do. I still think it’s a lot simpler this way.

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

Sidebar

Related Questions

This question relates very closely to Can a nested C++ class inherit its enclosing
I have a question which closely relates to this question . In my schema
This is closely related to another question: How can I measure thread stack depth?
This is closely related to an earlier question . In the managed world: How
This question relates to an ASP.NET website, originally developed in VS 2005 and now
This question relates to this question which I asked earlier this week. The answer
This question relates to those parts of the KenKen Latin Square puzzles which ask
Background: This question relates to versions of Delphi below 2009 (ie without Unicode support
This relates to my other question on accessing a REST service that uses forms
This is kind of a two part question. But it both relates to the

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.