Global Variable In A Function

Giganews Newsgroups
Subject: Global Variable In A Function
Posted by:  SamMan (p…@psfdev.com)
Date: Fri, 4 Jul 2003

I have a .js file that receives a value from an html page. I'd like this
value to be a global variable that all functions in the .js file can use. I
have tried just declaring a var at the top of my .js file, but when the
value comes into the function and gets assigned to that variable, it is not
global.

Any help, hints, etc. would be appreciated.

Thanks,
Sam

Replies