[thelist] Loading JavsScript file (*.js)

Chris Blessing webguy at mail.rit.edu
Thu Sep 19 15:26:00 CDT 2002

You could always document.write() the <script..> tag... throw something in
the querystring or set a cookie or something that says "ok, write the JS
file tag" and you can use that as a conditional for the document.write().

'course there's probably an easier way, who knows. :)

Chris Blessing
webguy at mail.rit.edu

> Hello Experts,
> I have a very large JavaScript file (size is about 40 KB). I have
> inserted it in
> HTML document with following line:
> <script language="JavaScript" src="myscript.js"></script>
> This file definitely increases the loading time of the HTML
> document as it loads
> along with HTML.
> Is it possible to load this file only when a user clicks on a
> certain button? I
> mean can I control its loading?
> Thank you!
> Syed Zeeshan Haider.
> http://syedzeeshanhaider.faithweb.com/

More information about the thelist mailing list