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

Hassan Schroeder hassan at webtuitive.com
Thu May 17 15:59:12 CDT 2001


Russell Scheinberg wrote:

>That is the window resizes but the menus maintain their original position.

> <SCRIPT ID="Loader" LANGUAGE="JavaScript1.2" SRC="HM_Loader.js" TYPE='text/javascript'></SCRIPT>

> <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
> <!--
> document.body.onresize = loaderRefresh()
> 
> function loaderRefresh(){
>    Loader.src = "HM_Loader.js"

I don't believe you want to try to "reload" the JavaScript file -
you want to *run the functions* again. So call them explicitly
in your loaderRefresh() function.

And since "ID" is not a legal attribute of the SCRIPT tag, I'd be
surprised if this is even doing what you think ... 

> }
> 
> //-->
> </SCRIPT>

HTH!
-- 
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 --




More information about the Javascript mailing list