/    Sign up×
Community /Pin to ProfileBookmark

window.onresize — proble – IE

window.onresize = function(){
…;
}
works different on IE and Firefox.

In IE window.onresize detects body re-size and on Firefox and other browsers function detects the actual application window re-size. Is there any way I can make may script to work in IExplorer the way it works in Firefox …. I need to detect a WINDOW and not Body re-size… ?????

to post a comment
JavaScript

5 Comments(s)

Copy linkTweet thisAlerts:
@KorApr 26.2010 — 

In IE window.onresize detects body re-size and on Firefox and other browsers function detects the actual application window re-size. [/QUOTE]

Really? What do you mean by "body re-size" in opposition with "application window re-size"? What is that: [I]application window[/I]? Can you re-form your problem, please?

As far as I know:

- In IE, Safari, and Chrome many re-size events fire as long as the user continues resizing the window.

- Opera uses as many re-size events, but fires them all at the end of the resizing.

- Firefox fires one re-size event at the end of the resizing.

But no one of the differences above applies to your problem....
Copy linkTweet thisAlerts:
@gayzurazauthorApr 26.2010 — When I load content using $("#some_div_id").load("some.php") into a div which has a css rule "height:auto;" Browser expands the height of that div and if div is bigger than window, browser adds a scroll bar. The problem is when browser adds a scroll bar, IE detects that as a window resizing... Other browsers don't do that! There is my problem....
Copy linkTweet thisAlerts:
@KorApr 26.2010 — There is my problem....[/QUOTE]
[I]Your[/I] problem is that you have used a javascript library (JQuery?) to create something, you (and we) don't know how, which onresize does something we don't understand.

Post a link to a test page and describe your problem. And tell us the framework/library you have used.
Copy linkTweet thisAlerts:
@KorApr 27.2010 — I see. Insert this in your code:
<i>
</i>document.onresize=function(){null}
×

Success!

Help @gayzuraz spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...