eire web design home page contact eire-web design eire web design and development site map
stepping on in business
• Welcome to Eire Web Design Ireland

Archive for the ‘JavaScript’ Category

Don’t get framed

Monday, October 15th, 2007

Recently I came across a website thatĀ  was displaying one of my pages in their own frame set which made it difficult to store the shopping cart session and was breaking the website functionality as well.

The solution was a small piece of Javascript added between theĀ HEAD tags to remove all frames:


This script checks to see if the current page is the “top” page. If it is not, it tells the web browser to load the current web page as the top, thus wiping out any frames. Of course, this script won’t work with browsers that don’t understand scripting, or where scripting is turned off, but the script will work on most browsers, and that makes it a pretty effective deterrent

Links...

Chicklets...
  • http://www.eire-webdesign.ie/blog/feed/
    http://www.eire-webdesign.ie/blog/feed/
    Google Reader or Homepage
    Add to My Yahoo!
    Subscribe with Bloglines
    Subscribe in NewsGator Online
    add to msn
    Add to My AOL
    Add to Technorati Favorites!
    pageflakes
    windows live