RE: Best Way to Do This?

by Chuck Evans <Chucke(at)captura.com>

 Date:  Mon, 20 Nov 2000 19:41:27 -0800
 To:  "'Linda Engelman '" <linda(at)conciliocreative.com>,
"'hwg-techniques(at)hwg.org '" <hwg-techniques(at)hwg.org>
  todo: View Thread, Original
A quick guess (not tested):

In document-b, have javascript set a variable equal to "document-b.html" (or
whatever).

Then have an if/then that tests to see whether or not doc-b is already in a
frameset. I used to use if ( parent.framename ) to do that, where framename
is just the name of one of the frames. At least a couple years ago, if the
frame existed (ie, there was a frameset) then the value was true. If the
value is true, do nothing. But, if the value is false, then redirect the
user to the "redirect" frameset page.

In the redirect frameset (different than the main frameset doc, though), use
document.write to write the frameset line for document-b.html (or whatever
html page the visitor accessed first).

May work, may not. Let me know. (Though someone else probably has a simpler
method.)

-----Original Message-----
From: Linda Engelman
To: hwg-techniques(at)hwg.org
Sent: 11/20/2000 6:32 PM
Subject: Best Way to Do This?

Hi gang --

Can someone recommend the easiest way to do the following?

I've got a bunch of pages that are part of a frameset.  If a user
happens 
to access a page without its frames (such as through a search engine), I

want to have some Javascript that adds frames back around the document.

I do NOT want to redirect the person back to the original frameset
document 
because it contains document-a.html in the main content area.  The page
the 
person is currently looking at is document-b.html.  So, I simply (maybe
not 
so simply??) want to surround the current HTML document
(document-b.html) 
with a designated top frame and left frame, making document-b.html
appear 
as the main content frame.

Can this be easily done?

Thank you!

Linda
<linda(at)conciliocreative.com>

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA

This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.