Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / April 2008

Tip: Looking for answers? Try searching our database.

javascript global variable

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
rodchar - 01 Apr 2008 15:48 GMT
hey all,
does each user get it's own copy of a javascript global variable?

thanks,
rodchar
Cowboy (Gregory A. Beamer) - 01 Apr 2008 16:08 GMT
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.

Signature

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!

*************************************************
> hey all,
> does each user get it's own copy of a javascript global variable?
>
> thanks,
> rodchar
rodchar - 01 Apr 2008 16:17 GMT
thank you for making sure we're on the right page, i appreciate the help,
rod.

> I am assuming you mean it this way:
>
[quoted text clipped - 24 lines]
> > thanks,
> > rodchar

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.