Click to See Complete Forum and Search --> : DHTML & tables


darheim
01-11-2003, 05:58 PM
I'm not really sure if this is a DHTML question, but I'll ask. I have a page that I load, and on it is a table is an IFRAME containing a DHTML script which I send to get a file called redirect.html, which in turn contains a DHTML script which pulls up another html file according to what day of the month it is. They work fine, except the IFRAME on the main page had it's height set for IE. When I viewed in NS7, it came up, but part of the info in the IFRAME was cut off. If I readjust the height for NS7, then in IE I have alot of white space under it? Is there a way to have the frame resize itself for each browser? Is there a different method anyone can suggest that accomplishes the same goal?

Zach Elfers
01-11-2003, 07:03 PM
You could do:

<script type="text/JavaScript">
<!--

if (navigator.appName == "MSIE") {
document.write("<iframe for IE>");
}
if (navigator.appName == "Netscape") {
document.write("<iframe for Netscape>");
}
else {
document.write("<other iframe>");
}

//-->
</script>

That should fix your problem.

Stefan
01-11-2003, 07:03 PM
Originally posted by darheim
Is there a way to have the frame resize itself for each browser?

Set the size using CSS and exploit IE bugs to feed it one value, while you give mozilla another.

Here is a table with various CSS bug exploits you can use including testcases and links to the detailes.
http://centricle.com/ref/css/filters/

And BTW, you should not abuse <table> for general page layout.