A
Andy Fish
Hi,
I have a HTML page with javascript in it which pops up another HTML page. I
can pass simple variables fairly freely between the two pages. I can pass
objects between them two, and I have noticed that when a method is invoked
on an object, it invokes in the context of the window that created that
object.
Now, when I pass an array from one window to another, the expression:
myArray.constructor == Array
returns false in the second window.
I think I know what's happening - when I reference "Array" in the second
window, I'm talking about the second window's array constructor which is not
the constructor that was used to construct the array.
Unfortunately, this doesn't help me much. What I need is a reliable way of
telling if something is an array or not, because my test "constructor ==
Array" isn't working. Any ideas?
Andy
I have a HTML page with javascript in it which pops up another HTML page. I
can pass simple variables fairly freely between the two pages. I can pass
objects between them two, and I have noticed that when a method is invoked
on an object, it invokes in the context of the window that created that
object.
Now, when I pass an array from one window to another, the expression:
myArray.constructor == Array
returns false in the second window.
I think I know what's happening - when I reference "Array" in the second
window, I'm talking about the second window's array constructor which is not
the constructor that was used to construct the array.
Unfortunately, this doesn't help me much. What I need is a reliable way of
telling if something is an array or not, because my test "constructor ==
Array" isn't working. Any ideas?
Andy