Loading ...
Sorry, an error occurred while loading the content.

1238Who unframed Roger Rabbit?

Expand Messages
  • Marco Bernardini
    Nov 12, 2000
    • 0 Attachment
      *This message was transferred with a trial version of CommuniGate(tm) Pro*

      Hello all!
      Just solved the biggest problem of frames!
      When a search engine scans your site and finds a frame, it index single pages, so all your nice work to create multiple frames is just like elections in Florida...
      But I wrote a little JavaScript able to check if the frame is in the right window and, if not, to open the main page containing frame definitions.
      Nice, isn't it?
      Suppose you have in index.html this frame definition:

      <frameset cols="180,*">
      <frame src="menu.htm" name="menu">
      <frame src="other.htm" name="foo">
      </frameset>

      In menu.htm you must add these lines:

      <HEAD>
      <SCRIPT LANGUAGE="JavaScript">
      <!--
      if (name != "menu")
      {
      alert("OOPS! You miss the right side!");
      parent.location=("index.html")
      }
      // -->
      </SCRIPT>
      </HEAD>

      And in other.htm you must add these ones:

      <HEAD>
      <SCRIPT LANGUAGE="JavaScript">
      <!--
      if (name != "foo")
      {
      alert("OOPS! You miss the left side!");
      parent.location=("index.html")
      }
      // -->
      </SCRIPT>
      </HEAD>

      Of course you can remove the alert(): I leave it just for debugging.

      Oh, if you want to see what I do when I don't hit keyboards go to
      http://cgi.ebay.com/aw-cgi/eBayISAPI.dll?ViewItem&item=493918288
      (no needs to buy, so this is not an ad <g>)

      Bye!

      Marco Bernardini
    • Show all 4 messages in this topic