On, or about 26/2/03 4:48 PM, "Dale Critchley" may have said:
> My site has frames (I haven't learned php yet.), but when people come to my
> site via search engines, they often go to a content page without the
> navigation and title frames. I've heard of a Dreamweaver plug-in that will
> insert code that will, when someone opens a page, check to see whether it's
> in the appropriate frame, and if not, make it so. I don't have
> Dreamweaver--using Claris Homepage. Is there some code or other code
> generator or a tutorial how to create that code?
Try this javascript I use:
<script language="JavaScript">
<!--
function fnCheckFrame() {
var strFramePage = unescape(window.location.search);
strFramePage = strFramePage.substring(1,strFramePage.length);
if (strFramePage != '') mainFrame.location.href = strFramePage;
}
//-->
</script>
in the head of the frameset page (index2.php3) in this case)
<frameset rows="132,1*" frameborder="NO" border="0" framespacing="0"
onload="fnCheckFrame()">
<frame name="topFrame" scrolling="NO" noresize src="wimatopnav.php3" >
<frame name="mainFrame" src="mainframe.php3">
</frameset>
in the body of index2.php3
<script language="JavaScript">
<!--
if (top.location.href == location.href) {
// deze pagina opnieuw openen, maar dan binnen frameset
top.location.href = 'index2.php3?mainframe.php3';
}
//-->
</script>
in the head of the framed page (mainframe.php3 in this case). Change this on
each page to be framed.
This is copied from a site I wrote at http://www.wima.org.nz
Check out the source code...
To see it work follow this url http://www.wima.org.nz/events.php3
Don't worry about the .php3 extension - that can be .html or .htm or .inc
Cheers
Andrew
--
[EMAIL PROTECTED]
http://homepages.paradise.net.nz/zx6rs/
--
Mac Webmasters is sponsored by <http://lowendmac.com/> and...
Small Dog Electronics has Lasso, Filemaker, and FileMaker Server on Sale!
High Technology for low prices. http://www.smalldog.com
Support Low End Mac <http://lowendmac.com/lists/support.html>
Mac Webmasters info: <http://lowendmac.com/lists/macweb.shtml>
--> AOL users, remove "mailto:"
Send list messages to: <mailto:[EMAIL PROTECTED]>
To unsubscribe, email: <mailto:[EMAIL PROTECTED]>
For digest mode, email: <mailto:[EMAIL PROTECTED]>
Subscription questions: <mailto:[EMAIL PROTECTED]>
List archive:
<http://www.mail-archive.com/mac.webmasters%40mail.maclaunch.com/>
Using a Mac? Free email & more at Applelinks! http://www.applelinks.com