javascript error with iframe in FF
<p>I have the code like below,</p>

<pre><code>var contentFrame = window.document.getElementById("globalSearch");
var content = contentFrame.document.getElementById("globalSearch");
</code></pre>

<p>Can some one please expalin me what is the difference between above two lines. in FF I'm getting error 'contentFrame.document is undefined'</p>

<p>and my form is something like below,</p>

<pre><code>&lt;form id="Search" action="&lt;c:url value="/search" /&gt;" method="get"&gt;
&lt;input .... /&gt;           
&lt;iframe style="visibility : hidden;position : absolute;top : 0; border : 1px solid WindowFrame;"frameborder="0"            src="&lt;c:url value="/search" /&gt;"
id="globalSearch" name="globalSearch"&gt;&lt;/iframe&gt;&lt;/form&gt;
</code></pre>

<p>Is there anyway I can get rid of the above error? I would be gald if some one give me the equivalent code in jquery which works in all browsers.</p>

<p>Thank you again!</p>

<hr>

<p>Actually, im my application, for every page a template being used. A template has header, footer menu html. the form shown below is defined in header.html                                                      </p>

<pre><code>&lt;form id="Search" action="&lt;c:url value="/search" /&gt;" method="get"&gt; 
  &lt;input .... /&gt;            
  &lt;iframe style="visibility : hidden;position : absolute;top : 0; border : 1px solid WindowFrame;" frameborder="0" src="&lt;c:url value="/search" /&gt;" id="globalSearch" name="globalSearch"&gt;&lt;/iframe&gt;
&lt;/form&gt;
</code></pre>

<p>That is the reason the code is reffering the globalSearch iframe id(considering as child element of parent page) as below,</p>

<pre><code>var contentFrame = window.document.getElementById("globalSearch"); 
var content = contentFrame.document.getElementById("globalSearch");                                                    
</code></pre>

<p>will <code>this-&gt;content=$(#globalSearch").contents();</code> works in this scenario? please clarify. Thanks in advance. this is very urgent. please help.</p>
