You are here: irt.org | FAQ | JavaScript | Document | Q584 [ previous next ]
Set a variable boolean flag to false at the top of your page, and then use the BODY tags onLoad event handler to set it to true, then when accessing your JavaScript functions you can check to see if the flag is true before continuing:
<html> <head> <script language="JavaScript"><!-- var myFlag = false; function functionName() { // code only executed when all JavaScript loaded } //--></script> </head> <body onLoad="myFlag=true"> ... <form> <input type="button" onClick="if (myFlag) functionName()" value="Click Me"> </form> ... </body> </html>