[Javascript] refresh on resize window/reload .js file only

Russell Scheinberg rscheinberg at lrk.com
Thu May 17 11:17:56 CDT 2001


Thanks. I should have known about the onResize handler. Didn't think about it. 

Let me explain why I asked the second part of this question. I am using heirmenus to create some sweet little menus for my site. Unfortunately they are "anchored" position-wise to images that are on the page. I have a formula that will position these menus correctly for different resolutions and window sizes. But if the user changes the the size of the window after it is loaded, the formulas don't reset the positions by themselves, so without the refresh action, the menus are all over the place EXCEPT where they are supposed to be. The refresh works great, but it will be a problem for those pages that require input into forms, since a refresh will reset all the forms back to the last time the page was loaded and all input since then will be lost. There may not be a way to do this, but I thought I'd ask anyway. By the way, the menu script is loaded through an included .js file, that is unrelated to the data input. Maybe if there was a way to just call the .js file without reloading the entire page......

Thanks.

>>> hassan at webtuitive.com 05/15/01 08:14PM >>>
Russell Scheinberg wrote:
> 
> I would like to create a function that will cause the window to 
> refresh whenever the window is resized.

<body onResize="location.reload();">

> Also, is there a way to reload a javascript source file without 
> reloading the rest of the data that might be loaded on the page 
> from the server or that has been input into form elements? Thanks.

Hmmmm - have to think about that a bit. Would the "reloaded" file 
replace existing variables/functions or add new ones?

-- 
H*
Hassan Schroeder ----------------------------- hassan at webtuitive.com 
Webtuitive Design ---(+1) 408-938-0567 --- http://www.webtuitive.com 

    -- creating dynamic Web sites and applications since 1994 --

_______________________________________________
Javascript mailing list
Javascript at LaTech.edu 
http://www.LaTech.edu/mailman/listinfo/javascript





More information about the Javascript mailing list