...

View Full Version : Browser Window Resize



greasonwolfe
11-09-2004, 01: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?

fci
11-09-2004, 01:53 AM
you're in luck..
http://www.mozilla.org/docs/dom/domref/dom_doc_ref66.html
http://www.mozilla.org/docs/dom/domref/dom_window_ref71.html
http://www.devguru.com/Technologies/ecmascript/quickref/evhan_onresize.html

so...


window.onresize = function()
{
// do stuff here....
};

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

greasonwolfe
11-09-2004, 02: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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum