[thelist] Javascript: Global variables in external .js?

Hassan Schroeder hassan at webtuitive.com
Sat Mar 8 22:37:37 CST 2003

Frank wrote:

> Just to clarify: I'm not getting any errors. Using "this.onload()" worked
> for me.
> I was wondering why "window.onload();" didn't. Mere curiosity on my part if
> you would have had the answer on the tip of your tongue.
> All of this is in an external .js file, which might be the reason why.

Curious -- I put that sample js into an external file and tried it;
same result, the variable is available to other functions.

What browser/OS are you seeing this problem with?

Hassan Schroeder ----------------------------- hassan at webtuitive.com
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

                           dream.  code.

More information about the thelist mailing list