Closed Thread Icon

Topic awaiting preservation: Serious this is silly now Pages that link to <a href="https://ozoneasylum.com/backlink?for=22330" title="Pages that link to Topic awaiting preservation: Serious this is silly now" rel="nofollow" >Topic awaiting preservation: Serious this is silly now\

 
Author Thread
bitdamaged
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 ]:.

Alexer
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

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 06-26-2004 17:01

bitdamaged: the syntax is :

code:
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 :

code:
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