Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:58

iFrame Sizing


Poster: ldeeder
Dated: Thursday August 10 2006 - 16:38:06 BST

I am using an iFrame inside of an html page. The html page is controlled by a CSS. The iFrame is set to a static height.

http://new2.regionalitsolutions.com/solutions/

My question is: is there anyway to make the iFrame a height % instead of using a static PX height? Is there something I can do in the menu to accomplish this? TIA

Larry

Got a little further


Poster: ldeeder
Dated: Thursday August 10 2006 - 19:01:13 BST

Check out this code:

http://new2.regionalitsolutions.com/sol ... frame.html

It looks a bit messed up, but I think it has to do with the placement of the code.

Inorder to make the iFrame height 100% I had to add more JavaScript which I think is conflicting with the menu code. I tried setting the iFrame paramaters through my CSS but no luck. This is the best I have found so far.

Can someone help me get this figured out. TIA

Code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE></TITLE>
<META NAME="Description" CONTENT="">
<meta content="C#" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
<link rel="stylesheet" type="text/css" media="screen" href="../global.css">
<script language="JavaScript">
<!--
function resize_iframe()
{
document.getElementById("_frame1").height=document.body.offsetHeight-document.getElementById("_frame1").offsetTop-26;//resize the iframe according to the size of the window
}

/*
window.onresize=
function (e)
{
location.reload();
};
*/
window.onresize=resize_iframe; //instead of using this you can use: <BODY onresize="resize_iframe()">
//-->
</script>
</HEAD>
<BODY>
<script src="../menu/milonic_src.js" type="text/javascript"></script>
<script src="../menu/mmenudom.js" type="text/javascript"></script>
<script src="../menu/menu_data.js" type="text/javascript"></script>
<script type="text/javascript" src="../menu/menu_data.js"></script>
<br>
<br>
<br>
<br>
<br>
<iframe src="SolutionsDefault.html" name="_frame1" id='_frame1' width=100% onload='resize_iframe()' scrolling="auto" frameborder="0"></iframe>
</BODY>
<script type="text/javascript" src="../menu/solutions.js">
</HTML>


Poster: Andy
Dated: Monday August 21 2006 - 12:58:12 BST

Just tried your page and it seems to be working OK.

Did you manage to fix it or am I looking in the wrong place?

Cheers,
Andy


Poster: ldeeder
Dated: Monday August 21 2006 - 15:05:43 BST

Hello Andy,

No, it is still not working. This is how it should look.

http://new2.regionalitsolutions.com/solutions/

This is how it should work, but the menu is all messed up.

http://new2.regionalitsolutions.com/sol ... frame.html

TIA Larry