[thelist] Loading JavsScript file (*.js)

Fernando Gómez fgomez at criba.edu.ar
Thu Sep 19 15:32:01 CDT 2002

Sorry, I should have omitted the SRC attribute in the <script> element:

<script language="JavaScript" src=""></script>

<button onclick="document.getElementById('myScript').src='myscript.js'">
Load script

Fernando Gómez

From: "Syed Zeeshan Haider" <szh at softhome.net>
Sent: Thursday, September 19, 2002 5:20 PM

> 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
> 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?

More information about the thelist mailing list