Closed Thread Icon

Topic awaiting preservation: Serious this is silly now (Page 1 of 1) Pages that link to <a href="" title="Pages that link to Topic awaiting preservation: Serious this is silly now (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: Serious this is silly now <span class="small">(Page 1 of 1)</span>\

Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 06-26-2004 03:10

I'm I missing something?

I thought

window.onresize = somefuntion()

Was the way to call a function when the window is resized. Is this no longer applicable? And if not what's the way to do this now?

.:[ Never resist a perfect moment ]:.

Nervous Wreck (II) Inmate

From: Juneau, Alaska
Insane since: Jun 2004

posted posted 06-26-2004 07:11

This is a long shot, but did you try capitalizing the "R" in "resize?" I'm not sure, but I think JavaScript is case-sensitive in this respect. Just a random shot from a newbie Good luck.

code-headed intern

Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 06-26-2004 17:01

bitdamaged: the syntax is :

window.onresize = somefuntion

That way, you assigns the _handler_ of your function called somefunction to the window.onresize event. You could also do it by declaring the function while assigning it to the event handler :

window.onresize = function()
// do something

Or you could also create a new Function object. Well you get the idea

« BackwardsOnwards »

Show Forum Drop Down Menu