check if a div has controls Javascript
<p>i use alert to check if a div has any child controls:</p>

<pre><code>alert(document.getElementById("MainContent_imgContainer").hasChildNodes());
</code></pre>

<p>and this always returns true even if the MainContent_imgContainer div doesn't have any child controls,</p>

<p>please tell me what is the better way to determine if a div has child controls.. thanks</p>
