24 February 2012

Quirking with Framesets

There's a way to create a top banner throughout your entire website, such as that you see on Nhv.Org
By clicking HOME, you're actually clicking on "index_home.htm" which is a page that is known as a frameset.

A frameset references two or more pages to create itself.  In this case, it references a file called banner.htm, which is only 60px tall, and stays at the top of the page.  As well as home.htm, which used to be where "home" once linked on the main page.

If you click "News" on the banner, it opens up in Blogspot.  Banner remains.
If you click "Audio" it opens up in Soundcloud.  Banner stays.

Quirking is a term that I use to describe when I get something done in a really simple manner which would have been possible in 1995.  This includes anything done with animated GIF's or Marquee tags.  There are no restraints to quirking, but usually it involves quickening the process of accomplishing something by doing it in a manner that is potentially way more glitchy.  I like glitches, too.  If computers were natural, they'd be natural mistakes.  Instead, they're more like the genius of artificial intelligence.

Creating a frameset with your index page is one way to create a top-banner menu for your entire site, even if you're browsing your content away from your own webpage, like on your Soundcloud page.

Once you create a frameset, the next thing you should do is include this code in the page where the pages split:
<script language="javascript" type="text/javascript">
if (self != top) {
    if (document.images)
        top.location.replace(window.location.href);
    else
        top.location.href = window.location.href;
}
</script>

Because let's say you double back to the main page with the frameset and re-click "home."  Without this code in "index," the framesets could continue to stack upon eachother.  This also prevents other people from doing the same thing to your web pages.

Now, whenever you re-visit the main page, you won't get double or triple banners.  Does not work in Facebook or Youtube, for the obvious potential for misuse.  In the case of NHV, I'm actually using it for a positive purpose: my free hyperlocal community bulletin website.

1 comment:

  1. quirky quirking! keep it up. always be open to learning new tools :)

    ReplyDelete