Re: javascript question

by "Bert Doorn" <bdoorn(at)iinet.net.au>

 Date:  Wed, 3 Nov 1999 21:44:13 +0800
 To:  <hwg-basics(at)hwg.org>
 References:  powernet
  todo: View Thread, Original
G'day

> How can I make the index.htm load so the user comes in the front
> door using the frameset.

You could use a little javascript into the HEAD of each page.  The script
would check whether the page is being displayed in a frameset and redirect
as appropriate.  Essentially the reverse of a frame-breaking script:

<SCRIPT TYPE="text/javascript">
<!-- hide
    if (self = top) top.location=index.html;
// stop hiding -->
</SCRIPT>

Note this does not take care of it being in someone else's frameset. There's
probably some way to get around that - just haven;t thought about that one
yet.

HTH
--
Bert Doorn, Web Developer
http://www.betterwebdesign.com.au/

Buy a 15Meg Website for $100 and start your own online business today!
http://www.skynary.com/perth-wa/

HTML: hwg-basics mailing list archives, maintained by Webmasters @ IWA