iframe with firefox
Posted: Tue May 15, 2007 11:08 am
feyd | Please use
ANY IDEAS WHY?
feyd | Please use[/syntax]
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I have an iframe i need to load with a href. In IE it works fine with firefox it will hold the height of the last page you clicked and not resize too the height.
so for example if i had 500 lines on page1.php and page2.php had 1 line, I get a scroll for the empty space on page2.php of 500 lines once i click on page1.php and then page2.php.
How do I get the iframe to resize itself?
heres my javascript and code
[syntax="html"]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<style type="text/css">
@import url('default.css');
</style>
<script>
function loadIframe(url) {
var layerObjNS
layerObjNS = 'the_iframe'
var width
width = '*'
if (document.layers){
document.layers[layerObjNS].load(url, width);
} else{
if (window.frames.length > -1){
window.frames[layerObjNS].location.href = url;
}
}
document.MM_returnValue = false;
}
</script>
</head>
<body>
<div id="bk_top"></div>
<div id="bk_side">
<div id="mainbody">
<div id="top_banner"></div>
<div id="logo"></div>
<div id="nhs_logo"></div>
<div id="menu_items">
<a href="javascript:loadIframe('iframe1.php')">Home</a> |
<a href="javascript:loadIframe('iframe2.php')">Site Map </a> |
<a href="javascript:loadIframe('iframe3.php')">Contact Us </a>
</div>
<div id="iframe_section"><iframe width='760' name="the_iframe" frameborder='0'></iframe></div>
</div>
</div>
<div id="bk_bottom">© Copyright 2007</div>
</body>
</html>ANY IDEAS WHY?
feyd | Please use[/syntax]
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]