I am encountering an issue with an IFrame inside a DIV where the SRC attribute is being dynamically set by a JavaScript function. When the SRC is set to "file.jsp", an onload function within the file.jsp containing style adjustments was causing the IFrame to spread all over the webpage once it completed. Essentially, the iframe was covering the entire webpage. I need help in finding a solution to maintain the IFrame position after the onload function finishes.
The code within my onload function is as follows:
function load() {
var url = window.location.href;
if (url.indexOf('iip') > -1) {
document.getElementById('peLibraryTreeDiv').style.width = "596px";
parent.document.getElementById('privateEquityDiv').style.width =
"96.9%";
parent.document.getElementById('privateEquityDiv').style.top =
"77px";
}
}