[thelist] ANOTHER frames question

Tom Busch tom at clickvisuals.com
Mon Sep 10 12:43:07 CDT 2001


this is basically how I do it, when the page loads it checks to see if it 
is within frames, if it isn't it loads the frames around it.

<script>
<!--
function checkFrames()
{
    if (top.location==location)
      {
         document.write('<frameset framespacing=0 frameborder=0 border=0 
bordercolor="#ffffff" rows="68,*">')
         document.write('<frame src="topfr.html" name="top" scrolling="no" 
noresize marginheight=0 marginwidth=0>')
         document.write('<frame src="',location,'" name="main" 
scrolling="auto" noresize marginheight=0 marginwidth=0>')
         document.write('</frameset>')
      }
}
//-->
</script>
<body onLoad="checkFrames();">

At 06:30 PM 9/10/2001 +0100, you wrote:
>"Green, Janet" wrote:
> > The earlier question about frames has reminded me that I've always 
> wanted to
> > ask this question: is there a way to create direct links to pages that load
> > within a frameset, but that still actually loads the frames around them?
>
>This has come up before and I remember there being niftier ways
>of doing this.  But I did a couple of simple things when building a
>tour a couple of years ago (when I couldn't rely on any particular
>server technology).  Both mean changing pages but not redesigning
>the site.
>
>Here's frameset URL:
>http://www.oed.com/public/tour/step-13.htm
>
>And here's one of the framed pages:
>http://www.oed.com/public/tour/remove-to-reframe/step-13.htm
>
>+ add JavaScript to the body tag so that an orphaned page will
>   be redisplayed by its frameset:
>   <BODY ONLOAD="if(self==top)top.location.href='/public/tour/step-13.htm'"
>   (we wrote a script that inserted this for)
>
>   This meant that each tour step had to have its own frameset page
>   (named the same thing in different directory).  However, you can
>   still do this for other site set-ups.
>
>+ I put the pages intended to be seen framed in a directory called
>   "remove-to-reframe" for the off-chance that the JS didn't work,
>   that someone would see it and knew what it meant.  The edited URL
>   calls the matching frameset.
>
>
>However, since all tour pages had their own URL anyway, these
>two things were used for those entering the tour via a search
>engine which ignored the noindex meta tag.
>
>
>Paola
>
>---------------------------------------
>For unsubscribe and other options, including
>the Tip Harvester and archive of TheList go to:
>http://lists.evolt.org Workers of the Web, evolt !


Tom Busch, Web Developer
Click! Visuals (920) 490-3210
http://www.clickvisuals.com/





More information about the thelist mailing list