Javascript function making the Iframe display in the whole browser after an action in iframe
<p>I display an IFrame in a div in a webpage.Inside the IFrame I have a hyperlink. On click of this link, a JS function will be invoked and all the check boxes present in that page will be unchecked.</p>

<p>The thing is when I click the Link named 'Clear All', all the check boxes are getting cleared but the DIV containing the IFrame is spreading over the entire page or simply put the whole webpage is showinf only the iframe.</p>

<p>The JS function is as follows</p>

<p>function clearAll() {</p>

<pre><code>try{
    var secNamesTable = document.getElementById('securityNamesTable');
    var docTypesTable = document.getElementById('docTypesTable');
    var rowCount = secNamesTable.rows.length;

    for ( var i = 0; i &lt; rowCount; i++) {
        var row = secNamesTable.rows[i];
        var checkBox = row.cells[0].childNodes[0];
        checkBox.checked=false;
    }
    rowCount = docTypesTable.rows.length;
    for ( var i = 0; i &lt; rowCount; i++) {
        var row = docTypesTable.rows[i];
        var checkBox = row.cells[0].childNodes[0];
        checkBox.checked=false;
    }
    var object = (document.getElementById('peLibraryTreeDiv')==null)?parent.document.getElementById('peLibraryTreeDiv'):document.getElementById('peLibraryTreeDiv');
    try{
        var messageDiv = (document.getElementById('messageDiv')==null)?parent.document.getElementById('messageDiv'):document.getElementById('messageDiv');
        messageDiv.innerHTML='Please select from the choices on the left';
    }
    catch(e){
        object.innerHTML='&lt;p style="color:206A7F; text-Align:center; position:relative; top:50px;" id="messageDiv"&gt;Please select from the choices on the left.&lt;/p&gt;';                 
    }
}
catch(e)
{
    alert('error occured-'+e.message);
}
return false;
</code></pre>

<p>}   </p>

<p>Please help me out of this.</p>

<p>Thanks,
kartheek</p>
