...

View Full Version : jsp inside iframe don't resize main window



rui
04-18-2005, 02:56 PM
Hi all, I have a problem with Iframes resize and the parent window. I'm developing an Intranet using a template and jsp's.
This is my problem:
- I have a html page(the template page) that contains a frameset:

<FRAMESET ROWS="*" COLS="*" FRAMEBORDER="NO" FRAMESPACING="2" BORDER="0" scrolling="yes">
<FRAME NAME="top" SRC="top.html" MARGINWIDTH="0" MARGINHEIGHT="0" FRAMEBORDER="NO">
</FRAMESET>

Inside the top.html file, I have an Iframe that contains all the layout for the menus(top and left side menus) of the intranet:

<IFRAME id="EXPLORERLEFTTOP" NAME="EXPLORERLEFTTOP" SRC="/menus/layout.jsp" width="975" frameBorder='0' language=javascript onload="return frm_onload(EXPLORERLEFTTOP);" scrolling='no'></IFRAME>

and inside the layout.jsp file, i have another iframe that contains the content of the menu's options of the intranet. Like this:

<div id="Content">
</div>
<script>
function calcHeight(frmname)
{
var the_height=frmname.document.body.scrollHeight + (frmname.document.body.offsetHeight - frmname.document.body.clientHeight);
frmname.frameElement.height=the_height;
}

url='whatever.jsp';
document.getElementById('Content').innerHTML="<iframe id='content_frame' name='content_frame' src='"+url+"' width='745' frameBorder='0' language=javascript onLoad='calcHeight(content_frame);'></iframe>";
</script>

The problem is inside this last iframe (the 'content_frame') I called a jsp 'whatever.jsp' that have a form and when I submit this form or click a link to another jsp that is bigger than then height of the whatever.jsp, the height of the iframe changes (because i use onLoad='calcHeight(content_frame);'), but the IE parent window doesn't show all the height of the iframe. the window scrollbars only scroll until the height of the whatever.jsp when it was first loaded on the iframe 'content_frame'.

sorry for bad english and thanks for the help.

rui
04-19-2005, 11:53 AM
Does anybody can help me? :confused:

rui
04-19-2005, 04:00 PM
I managed to solve this question.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum