I've been spending the last week trying to make this very complicated javascript work for both IE an FF, and I'm literally on the cusp of making it work exactly the way I want. Here's the deal...

I'm using the following javascript on all my orphan pages to solve the problem of search engines cataloging my content pages that are meant to be loaded into iframes.

Code:
<script language="JavaScript" type="text/javascript">
passpage = document.URL
if (top.location == self.location)
location.replace("parent_frame.html?" + passpage)
</script>
This forces the orphan page to go a file called "parent_frame.html" that contains the iframe where the orphan page will be displayed in. The receiving javascript on that page looks like this:

Code:
<script language="JavaScript" type="text/javascript">
origURL = parent.document.URL
contentURL = origURL.substring(origURL.indexOf('?')+1, origURL.length)
document.write('<iframe src=\"' + contentURL + '\" name="main" style="border:0px solid gray" width=778  height=700 frameborder=0  marginheight=0 marginwidth=0><\/iframeset>')
</script>
I have to say this works beautifully. But the challenge I'm facing now is trying to get the iframe in the parent page to resize automatically based on the orphan page that's being loaded in. I've tried a combination of iframe resizing scripts, including the Iframe SSI script II here on DD. It works great for IE, but not in FF (at least not when your dealing advanced HTML pages). Nonetheless, I finally found an iframe resizing script that works great in both browsers...

Code:
[highlight=JavaScript]
<script language="JavaScript">
<!--
function calcHeight()
{
//find the height of the internal page
var the_height=
document.getElementById('content').contentWindow.
document.body.scrollHeight;

//change the height of the iframe
document.getElementById('content').height=
the_height;
}
//-->
</script>
[/highlight]
Typically this is the code that would follow for the iframe...

Code:
<iframe name="content" id="content" style="border:0px" width=923 onLoad="calcHeight();" src="home.htm" scrolling="NO" frameborder="0" height="0"> </iframe>
Note the use of both name="content" and id="content". This is the secret I finally discovered to creating resizeable iframes for Firefox (even dynamic pages) while still working in Internet Explorer. The only problem is it works great if I were using it to load a PARENT PAGE FIRST which then loads the orphan page into the iframe. Instead, I'm doing the reverse; I'm loading an orphan page which loads itself into the parent page via iframe...

So, in conclusion, once someone loads one of my orphan pages, it will immediately pass itself off into the parent page, where the following code will be waiting for it...

Code:
<script language="JavaScript">
<!--
function calcHeight()
{
//find the height of the internal page
var the_height=
document.getElementById('main').contentWindow.
document.body.scrollHeight;

//change the height of the iframe
document.getElementById('main').height=
the_height;
}
//-->
</script>


<script language="JavaScript" type="text/javascript">
origURL = parent.document.URL
contentURL = origURL.substring(origURL.indexOf('?')+1, origURL.length)
document.write('<iframe src=\"' + contentURL + '\" name="main" id="main" style="border:0px solid gray" width=778  frameborder=0  marginheight=0 marginwidth=0><\/iframeset>')
</script>
And this is where everything goes wrong. The javascript for autoresize, will not work with the javascript for loading an ORPHAN PAGE FIRST into the iframe of its parent page. So, that's where I'm at. Sorry for the lengthy backstory, but any suggestions would be welcomed. I'm hoping the problem is something staring me in the face.

Thanks