Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] global variables in frames
- From: javascript@xxxxxxxxxx (Dan Costea)
- Subject: [Javascript] global variables in frames
- Date: Thu, 28 Nov 2002 10:25:37 +0200
This is a multi-part message in MIME format. ------=_NextPart_000_00CC_01C296C8.7E7F1B00 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable when you define a variable, define it as top object variable: top.myVar =3D 0; // DON'T with "var" keyword to access it from any frame, just use: top.myVar ----- Original Message -----=20 From: Girish Chawla=20 To: javascript@xxxxxxxxxx=20 Sent: Wednesday, November 27, 2002 3:43 PM Subject: [Javascript] global variables in frames Hi, I have a window with 3 frames.=20 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 ------=_NextPart_000_00CC_01C296C8.7E7F1B00 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Diso-8859-1"> <META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3DArial size=3D2>when you define a variable, define it = as top=20 object variable:</FONT></DIV> <DIV><FONT face=3DArial size=3D2>top.myVar =3D 0; // DON'T with "var"=20 keyword</FONT></DIV> <DIV><FONT face=3DArial size=3D2>to access it from any frame, just use:=20 top.myVar</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <BLOCKQUOTE dir=3Dltr=20 style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; = BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV> <DIV=20 style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: = black"><B>From:</B>=20 <A title=3Dcgirish@xxxxxxxxxx = href=3D"mailto:cgirish@xxxxxxxxxx">Girish Chawla</A>=20 </DIV> <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A = title=3Djavascript@xxxxxxxxxx=20 href=3D"mailto:javascript@xxxxxxxxxx">javascript@xxxxxxxxxx</A> </DIV> <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Wednesday, November 27, = 2002 3:43=20 PM</DIV> <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> [Javascript] global = variables in=20 frames</DIV> <DIV><BR></DIV> <DIV><FONT face=3DArial size=3D2>Hi,<BR><BR>I have a window with 3 = frames. <BR>I=20 want to access a global variable "xyz" from all the<BR>frame and = I want=20 to change the value from any frame.<BR><BR>How do I define this=20 variable?<BR>thanks in=20 advance..<BR>G<BR><BR></FONT></DIV></BLOCKQUOTE></BODY></HTML> ------=_NextPart_000_00CC_01C296C8.7E7F1B00--
- References:
- [Javascript] global variables in frames
- From: Girish Chawla
- [Javascript] global variables in frames
- Prev by Date: [Javascript] Removing Header and footer info when printing
- Next by Date: [Javascript] Java and Flash anim
- Previous by thread: [Javascript] global variables in frames
- Next by thread: [Javascript] global variables in frames
- Index(es):