Using Array class in parent and child windows (javascript question) -
I'm actually coding a case where a child popup window transfer data as the original window:
var childArrayData = new array (); Child Arreretta [0] = 'Data Text 1'; Child Arredata [1] = 'Data Text2'; Child Arredata [2] = 'Data Text 3'; Window.opener.parentVariable = childArrayData;
I found an error that was resolved:
var childArrayData = new window.opener.Array (); & Lt; ----- childArrayData [0] = 'Data Lesson 1'; Child Arredata [1] = 'Data Text2'; Child Arredata [2] = 'Data Text 3'; Window.opener.parentVariable = childArrayData;
Why is the array class different between two separate windows? Does this name belong to the place? Can you mention any article about the answer?
Thank you in advance.
EVEVE
This is a known problem Written by Douglas Crockford.
When you call
array
, you are talking aboutwindow.Array
. TheWindow
browser is the reference object, and you get a per page (or frame). All the arrays created within a reference will have the property of their constructor set towindow.Array
.An array created in a different context is a different
window. Ore
, then your testmyArray for example array
fails. The ECMAScript standard does not discuss many references, even though almost all implementations help them. ECMAScript also fails to provide a reliable technology to test the type of standard orange. The obvious thing would have happened
Comments
Post a Comment