Netscape and Frames

liunx

Guest
Hey All,<br />
<br />
I've been trying to get my friends website to work in netscape 4. I've specifically set the rows (and on the second page, the cols,) yet it won't line up in netscape 4. The site works fine in IE and in other versions of netscape (6+).<br />
<br />
You can view the site here: <!-- m --><a class="postlink" href="http://www21.brinkster.com/fuzztrek/kenshin">http://www21.brinkster.com/fuzztrek/kenshin</a><!-- m --><br />
<br />
If you can tell me if there's something I need to add, or change, to get this to line up in netscape please tell me!<br />
<br />
Any information would be greatly appreciated!<br />
<br />
Fuzztrek<!--content-->I don't think that will work<br />
<br />
noresize="noresize"<br />
<br />
just do this<br />
<br />
<frame src=http://www.htmlforums.com/archive/index.php/"top.html" frameborder="0" scrolling="no" noresize /><br />
<br />
other than tha tI don't have NS here to test it with<!--content-->er... noresize="noresize" is the xhtml code, but I tested it and it doesn't matter either way.<!--content-->well from what I can tell you have to play around with the values in the file middle.html<br />
<br />
<FRAMESET border=0 frameSpacing=0 frameBorder=0 cols="144, 429, *"><!--content-->I have just added JS to check which browser is reading the page, then I write thr frameset accordingly. <br />
There are some differences for N4, so you may have to play with numbers a little....<br />
<br />
here is some sample code... you should get the basic idea. I use JS to check for the browser, then I check screensize, then I write out a frameset based upon the results. <br />
<br />
<br />
<html><br />
<head><br />
<SCRIPT language=Javascript><br />
// break out of frames //<br />
if (top.location != location) {<br />
top.location.href = <!-- m --><a class="postlink" href="http://www.htmlforums.com/archive/index.php/document.location.href">http://www.htmlforums.com/archive/index ... ation.href</a><!-- m --> ;<br />
}<br />
<br />
//reloads page if netscape resizes//<br />
if (document.layers) {<br />
saveWidth=window.innerWidth<br />
saveHeight=window.innerHeight<br />
window.onresize=resizeFix<br />
}<br />
<br />
function resizeFix() {<br />
if (saveWidth != innerWidth || saveHeight != innerHeight) {<br />
document.location.reload()<br />
}<br />
}<br />
<br />
</script><br />
</head><br />
</html><br />
<br />
<Script language=javascript><!--<br />
// create frame size based on browser // <br />
if (document.all){<br />
//IE4,5<br />
fsize='55,*,35,15%';<br />
}else{<br />
if (document.layers){<br />
//NS4<br />
fsize='59,*,40,15%';<br />
}else{<br />
if (document.getElementById){<br />
fsize='55,*,35,15%';<br />
}else{<br />
if (document.images){<br />
fsize='55,*,35,15%';<br />
}else{ //NS2,IE3<br />
fsize='55,*,35,15%';<br />
}}}}<br />
<br />
<br />
if ((screen.width == 640) && (screen.height == 480)) {<br />
size="sm";<br />
}else{<br />
if ((screen.width == 800) && (screen.height == 600)){<br />
size="m";<br />
}else{<br />
if ((screen.width == 1024) && (screen.height == 768)){<br />
size="lg";<br />
}else{<br />
if ((screen.width == 1280) && (screen.height == 1024)){<br />
size="xlg";<br />
}else{<br />
if ((screen.width > 1280) && (screen.height > 1024)){<br />
size="xlg";<br />
}else{ <br />
size="md";<br />
}}}}} <br />
//--><br />
// write frameseet //<br />
document.write("<frameset rows=" + fsize + " border=0 frameborder=0 noresize=yes scrolling=no><frame src='http://www.htmlforums.com/archive/index.php/header.cfm' name=header scrolling=no noresize=yes><frame src=http://www.htmlforums.com/archive/index.php/main.cfm?size=" + size + " name=main scrolling=no noresize=yes><frame src='toolbar.cfm' name=toolbar scrolling=no noresize=yes><frame src='http://www.htmlforums.com/archive/index.php/footer.cfm' name=footer scrolling=no noresize=yes></frameset>");<br />
</script><!--content-->Thanks a lot!<br />
<br />
With a little modification, I got everything to work.. fairly well. Its still like.. a pixel off in netscape, cause for somereason when you change the window size to 750x550, you need to change the values again :| but anyway.. you can view the finished site here:<br />
<br />
<!-- m --><a class="postlink" href="http://www.gardenoftears.cjb.net">http://www.gardenoftears.cjb.net</a><!-- m --><br />
<br />
THANKS again!!<br />
Fuzztrek<!--content-->you can reload the frames if netscape resizes....<br />
<br />
<br />
<script language="javascript"><br />
if (document.layers) {<br />
saveWidth=window.innerWidth<br />
saveHeight=window.innerHeight<br />
window.onresize=resizeFix<br />
}<br />
<br />
function resizeFix() {<br />
if (saveWidth != innerWidth | | saveHeight != innerHeight) {<br />
document.location.reload()<br />
}<br />
}<br />
<br />
</script><!--content-->thanks, i did that, but i was talking about when you set the browser window to a specific size.<!--content-->Originally posted by Dr. Web <br />
here is some sample code... [/size][/code] <br />
<br />
Did that code not help to set specific sizes per browser type?<!--content-->nono.. i mean when you (as in the programmer) change the width & height in javascript, eg:<br />
<br />
window.open('testpage.htm','myExample4','width=200,height=200');<br />
<br />
Thats when it kinda screwes up.. just a pixel off though. i tried changing the values for the frameset, it doesn't make much difference.. just one pixel off. its not that noticible, so i'm not that worried about it.<!--content-->
 
Back
Top