G-Bomb
Joined: 29 Feb 2004 Posts: 73
|
Posted: Mon Mar 01, 2004 8:46 pm Post subject: Keeping pages in frames. (JavaScript) |
|
|
These scripts will allow any pages that wish to stay within the frames that you may have on your website.
Insert this code on the frames page itself:
| Code: | <HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript"><!--
// Automatically Maximize Screen
if (parseInt(navigator.appVersion) > 3) {
if (navigator.appName=="Netscape") {
if (top.screenX > 0 || top.screenY > 0)
top.moveTo(1,1);
if (top.outerWidth < screen.availWidth)
top.outerWidth = screen.availWidth;
if (top.outerHeight < screen.availHeight)
top.outerHeight = screen.availHeight;
}
else {
top.moveTo(-1,-1);
top.resizeTo(screen.availWidth + 1,screen.availHeight + 1);
}
}
// Puts correct page in body section
pageURL = "body.htm";
if (parent.document.URL) {
parentURL = parent.document.URL;
if (parentURL.indexOf('?') != -1) {
pageURL = parentURL.substring(parentURL.indexOf('?')+1,parentURL.length);
}
}
function fillFrame() {
parent.body.location.href = pageURL;
}
// --></SCRIPT>
</HEAD>
<FRAMESET COLS="15%,*" BORDER="0" FRAMEBORDER="0" onLoad="fillFrame();">
<FRAME SRC="margin.htm" NAME="margin" NORESIZE target="body">
<FRAME SRC="javascript:parent.blank" NAME="body" NORESIZE target="body">
</FRAMESET>
</HTML> |
|
|