[Javascript] global variables in frames

Dan Costea costea.dan at ssi-schaefer.ro
Thu Nov 28 02:25:37 CST 2002


when you define a variable, define it as top object variable:
top.myVar = 0; // DON'T with "var" keyword
to access it from any frame, just use: top.myVar

  ----- Original Message ----- 
  From: Girish Chawla 
  To: javascript at LaTech.edu 
  Sent: Wednesday, November 27, 2002 3:43 PM
  Subject: [Javascript] global variables in frames


  Hi,

  I have a window with 3 frames. 
  I want to access a global variable "xyz"  from all the
  frame and I want to change the value from any frame.

  How do I define this variable?
  thanks in advance..
  G


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20021128/cd59f4d5/attachment.htm>


More information about the Javascript mailing list