Forum Moderators: open
I have the standard if self isnt self goto main index java checker...
So I put this together... IT ACTUALLY WORKS... but is messy. I need help. I see javascript errors...
I see dead people...
I need help.
Calgon take me away.
<script language="JavaScript">
title = document.title
if (top.location == self.location)
passpage = document.url
document.write("<title>" + title + "</title>");
document.write('<frameset rows="90,100%,26" border="0" frameborder="0" framespacing="0"><frame name="topnav" src="$vboptions[bburl]/pull.php?do=header" noresize scrolling="no"><frame src=\"' + passpage + '\" name="main_win" noresize><frame name="bottomnav" src="$vboptions[bburl]/pull.php?do=footer" noresize scrolling="no"><\/frameset> ')
document.write("<title>" + title + "</title>");
</script>
// This script should be called at the end of the html <HEAD>function cached() // true if in Google, Yahoo or MSN cache
{ var s = document.location.pathname;return (s.indexOf("/search") >= 0) ¦¦ (s.indexOf("/cache") >= 0);
};function writeFrames(s)
{ with (document) {
writeln('<frameset border="0" rows="52,*">');
writeln(' <frame src="top.html" name="fr_top" noresize marginwidth="0" marginheight="0" scrolling="no">');
writeln(' <frame src="' + s + '" name="fr_main" noresize marginwidth="0" marginheight="0">');
}}function createFrames()
{ if (cached()) return false;with (document) {
var s = location.href;var h = '';
var i = s.indexOf('#');
if (i > 0) {
h = s.substr(i);
s = s.substr(0,i);
}if (s.indexOf('?') < 0) s = s + '?'; else s = s + '&';
s = s + 'frameload=1'; // essential that different url is loaded into content frameif (h) s = s + h;
open();
writeln('</head>');
writeFrames(s);
writeln('<noframes><body>Frames required.</body></noframes></frameset></html>');
close();
}};if (top == self) createFrames();// else focus();
Kaled.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<!--
The doctype url has been omitted to prevent the display of a horizontal scrollbar in js/frames mode (IE).
The correct url is "http://www.w3.org/TR/html4/loose.dtd".
-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<base target="_top">
<link rel="stylesheet" type="text/css" href="std.css">
<!-- TemplateBeginEditable name="title, etc" -->
<title>Untitled Document</title>
<!-- TemplateEndEditable -->
<script src="../frames_2h.js" type="text/javascript"></script>
<!-- TemplateParam name="sitelinks" type="boolean" value="false" -->
</head><body>
<noscript>
<div id="banner">
<iframe
src="top.html"
height="52" width="100%" marginheight="0" marginwidth="0" scrolling="no" frameborder="0">
<p style="background-color:#FFFF80; padding:4px"> <!-- js or iframes required for nav bar--></p><br>
</iframe>
</div>
</noscript><div id="body">
<p id="toplinks"><a href="index.html"><!-- TemplateBeginEditable name="body - homelink" -->home<!-- TemplateEndEditable --></a></p><h1 style="white-space:nowrap"><!-- TemplateBeginEditable name="body - title" -->page title<!-- TemplateEndEditable --></h1>
<!-- TemplateBeginEditable name="body - main" -->main content<!-- TemplateEndEditable -->
<!-- TemplateBeginIf cond="_document['sitelinks']" -->
<h4>Links</h4>
<div class="sitelinks">
-- edited for webmasterworld --
</div>
<!-- TemplateEndIf --></div>
</body>
</html>
It could be tidier but it works.
Kaled.