P
Patrick
Hi
I am in the process of learning JS.This particular portion of code is
part of an online tutorial about the open() and close() methods of the
window object.
I like to have found out how to access newly openened windows and
being able to change their properties via the parent window.
But what exactly is that "aa" in there?
I understand it is a name given to the newly open window but i am
confused as if it is a variable or something else?
I thought the name of the new window would be between the URL and
properties
('URL','Newwindownamehere','properties') and that this name('New
windownamehere') would be used to access the new window from the
parent window.
I tried to put var in front of 'aa' and got an error.Obviously since
that code isn't between the <SCRIPT></SCRIPT> tags, i doubt 'aa' is a
variable.
I guess as i keep learning objects, i will find out but it's bugging
me!
So i hope someone can tell me.Beside that i do understand all the code
pasted here.
<body>
<form>
<input type="button" value="Open another page"
onClick="aa=window.open('test.htm','','width=200,height=200')">
<input type="radio" name="x" onClick="aa.document.bgColor='red'">
<input type="radio" name="x" onClick="aa.document.bgColor='green'">
<input type="radio" name="x" onClick="aa.document.bgColor='yellow'">
</form>
</body>
Thanks a lot
Patrick
(e-mail address removed)
(The posting email isn't valid,use the one above.)
I am in the process of learning JS.This particular portion of code is
part of an online tutorial about the open() and close() methods of the
window object.
I like to have found out how to access newly openened windows and
being able to change their properties via the parent window.
But what exactly is that "aa" in there?
I understand it is a name given to the newly open window but i am
confused as if it is a variable or something else?
I thought the name of the new window would be between the URL and
properties
('URL','Newwindownamehere','properties') and that this name('New
windownamehere') would be used to access the new window from the
parent window.
I tried to put var in front of 'aa' and got an error.Obviously since
that code isn't between the <SCRIPT></SCRIPT> tags, i doubt 'aa' is a
variable.
I guess as i keep learning objects, i will find out but it's bugging
me!
So i hope someone can tell me.Beside that i do understand all the code
pasted here.
<body>
<form>
<input type="button" value="Open another page"
onClick="aa=window.open('test.htm','','width=200,height=200')">
<input type="radio" name="x" onClick="aa.document.bgColor='red'">
<input type="radio" name="x" onClick="aa.document.bgColor='green'">
<input type="radio" name="x" onClick="aa.document.bgColor='yellow'">
</form>
</body>
Thanks a lot
Patrick
(e-mail address removed)
(The posting email isn't valid,use the one above.)