Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q411 How do I stop old versions of netscape (pre 3) and Internet Explorer (pre 4) from giving errors due to them not seeing *.js files which define functions used later in the page?

You are here: irt.org | FAQ | JavaScript | Source | Q411 [ previous next ]

Set a variable in the *.js file to true:

<script language="JavaScript"><!--
var loaded = false;
//--></script>

<script src="library.js"></script>

And then in library.js:

loaded = true;

And then you can check this before invoking any functions stored in library.js:

if (loaded) function_name();

©2018 Martin Webb