Forum Moderators: open
The html code is based around an IFRAME. That will work for IE5+, NN6, MOZ, and Opera 4+.
I use an external javascript to feed Netscape. The call is placed after the IFRAME and before the closing /IFRAME tag.
<iframe src="textserver.cgi" width="620" height="32" frameborder="0" scrolling="auto">
<SCRIPT LANGUAGE='JavaScript1.2' TYPE="text/javascript">
if (navigator.appName=='Netscape'){
document.write('<s'+'cript src="netscape.js">');
document.write('</'+'script>');
}
</script>
</iframe>
Will I get into any trouble with the javascript call in the "noframe" portion of the IFRAME? I've even thought about skipping the netscape test in the javascript and just feeding the doc write external. For example:
<iframe src="textserver.cgi" width="620" height="32" frameborder="0" scrolling="auto">
<SCRIPT LANGUAGE='JavaScript1.2' SRC='netscape.js' TYPE="text/javascript"></SCRIPT>
</iframe>
I'm a touch leary of that when it comes to compatability.
What do you think of the overall approach? Does it look sound? Any major trouble spots that I could get into.
The trick is this: wrap a LAYER in an IFRAME of the same name. NN4 renders the LAYER and ignores the IFRAME. But NN6 and IE4/5 render the IFRAME and ignore the LAYER.
<IFRAME ID="foo" SRC=file.html>
<LAYER NAME="foo" SRC=file.html>
</LAYER>
</IFRAME>
It looks pretty bulletproof to me, but I haven't used it so far.
The only one of the big ones it leaves out is Opera 3.62 (my default browser). Livable for the most part. I think leaving out the javascript is worth more that .001% of the browser market.