Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

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?

irt.org | Knowledge Base | JavaScript | Source | Q411 [ previous next ]

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?

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();

Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.