View Full Version : Browser Window Resize

11-09-2004, 02:42 AM
This might sound stupid and if it does, I am sorry, but I cant find any reference to this information. I know that by using js, I can force a resize of the window, but I am curious if there is any way to detect whether the end user has resized the window other than setting a timed interval and reloading the parameters that might be altered by a user initiated resizing of the window?

11-09-2004, 02:53 AM
you're in luck..


window.onresize = function()
// do stuff here....

11-09-2004, 03:25 AM
Much Coolness! :)

11-09-2004, 03:34 AM
Actually, one more question. . . I already have a function designed to set the parameters of the object in question. The function calls for the window width and adjusts the size of a table element accordingly. However, if I am going to use the

window.onresize = functionname()

is there a specific place that it needs to be placed or does it simply need to reside within the head/script tags?

Again, much coolness for the information.