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

BEKIM BACAJ Trojani2000 at hotmail.com
Wed May 16 22:22:18 CDT 2001





----- Original Message -----
From: Russell Scheinberg
Sent: Tuesday, May 15, 2001 10:16 PM
To: javascript at LaTech.edu
Subject: [Javascript] refresh on resize window/reload .js file only


I would like to create a function that will cause the window to refresh whenever the window is resized. Anyone know how to do this or can point me to a site that has this explained?  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.

******************************************************
Well, your first question has been answered.
As about the second one, try this:
1. Give you're script an ID.
<script id="refreshing" src="refreshable.js">
</script>
2. Choose you're event for reloading the script src,- for example I will use the onClick :
someElementID.onclick=scriptRefreshfunction
                  *[someElementID] is the ID of the element that you like to fire the event.
           
3. Write the function:
function scriptRefreshfunction(){  refreshing.src="the_address_of_the_script\\refreshable.js"    }
But in case that this script (efreshable.js) writes the actual Forms of the page. You're form-inputs will be lost I guess, but who knows, -sometimes the forms do not loose focus even if they are refreshened, -there are casses that even the input data remains, but that's a bug!
Cheers!
_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
http://www.LaTech.edu/mailman/listinfo/javascript<br clear=all><hr>Get Your Private, Free E-mail from MSN Hotmail at <a href="http://www.hotmail.com">http://www.hotmail.com</a>.<br></p>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20010517/e615d947/attachment.htm>


More information about the Javascript mailing list