javascript global variable

  • Thread starter Thread starter rodchar
  • Start date Start date
R

rodchar

hey all,
does each user get it's own copy of a javascript global variable?

thanks,
rodchar
 
I am assuming you mean it this way:

//global variable
var a = 10;

function SomeFunction()
{
//changing global variable
a = 20;

//local variable
var b = 20;
}

In this case, the local and global variables both have page scope. Even if
you place these variables into files, they only exist as long as the page is
accessed.

So, yes, each user gets his own global variables.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss

or just read it:
http://gregorybeamer.spaces.live.com/

*************************************************
| Think outside the box!
|
*************************************************
 
Back
Top