Two same javascript code behaving in different way(In different browser)
<p>i have a form with name <code>frmOrderReschedule</code> and an hidden element <code>frmOrderReschedule</code>.
i tried to access it in this way-</p>

<pre><code>document.frmOrderReschedule.newSalesOrderNumber.length
</code></pre>

<p>it gave me error document.frmOrderReschedule.newSalesOrderNumber.length is <code>undefined</code>, but when i try in fallowing way it works properly</p>

<pre><code>document.getElementsByName('newSalesOrderNumber').length;  
</code></pre>

<p>this is happening in Mozila only.Any one can throw some light on it, why it's happenning like this.
Thanks in Advance!!!</p>
