JavaScript: when I pass array from iframe function the array lose his type!
<p>I have an iframe in a form.
The iframe contains some info that I want deliver to the form parent by instance of Array.
The problem: the Array instance loses it's type and becomes an object!
The iframe function:</p>

<pre><code>function getIDS2() { return new Array(); }
</code></pre>

<p>The parent call code:</p>

<pre><code>alert(top.frames["sup_search"].getIDS2() instanceof Array);
</code></pre>

<p>Of course the answer for the alert is false...
So, I can fix it by doing this:</p>

<pre><code>var arr = [];
for(var i =0; i &lt; SuppliersIDs.length; i+=1) {
    arr.push(SuppliersIDs[i]);
}
</code></pre>

<p>Where SuppliersIDs is the delivered array and arr is the new true type array.
But why is this not working as I want it to?
By the way, is there any there a way to access the iframe func with jQuery??</p>

<p>Thanks for help.</p>
