Reliable Answers - News and Commentary

'Super Break Out' Proxy and Frame Break-out Script

This 'bounce-out' is accomplished via the following code:

<script language="javascript" type="text/javascript">
/* ====================================================== *
'  Super-Break-Out
'* ====================================================== *
'  Written By   : Shawn K. Hall [Reliable]
'  Inputs       : sMyDom = Domain to force url back to
'               :      * CHANGE sMyDom!!!
'               :      * MUST Be lowercase
'               :      * break it into several words
'               :        to limit proxy alteration
'  Description  : This forces the current document to the
'               : top of any *remote* frames (it allows
'               : framing from YOUR server) AND forces
'               : the client domain to be that depicted
'               : in sMyDom.
'  Usage Sample : Just include this code. It will
'               : automatically run every time.
'* ====================================================== */
var sMyDom = 'reliable'+'answers'+'.com';
if (top.document.domain != sMyDom) {
  top.location.replace(document.URL.replace(document.domain, sMyDom));

It has the added benefit of persisting the current path of the active page, so if it's being raised from a sub-page of the site it will be redirected to the corresponding page on your site.

Three VERY important notes:

And though this wasn't intended, it looks like it should work as an alternative to the common 'get-out-of-frames' script, while allowing pages/framesets on your own domain to frame your own pages. Pretty nifty. :)

Here's a couple links to test it out, the 'end-page' should always be


As always, client-side script requires that the client support script in order for it to work at all. Though it is rare these days that a browser will not support script, it may be disabled or limited due to security concerns. As long as scripting is available on the client this script should function correctly without errors.

Carschooling by Diane Flynn Keith

Take me to the top

We invite you
to visit:

Professional Web Hosting and Design Services: 12 Point Design Local Homeschool provides the most up-to-date support group listings in a geographical and searchable index Budget Homeschool Kidjacked -- To seize control of a child, by use of force SaferPC dispels security misunderstandings and provides you with a solid understanding of viruses and computer security Reliable Answers - developer information, current news, human interest and legislative news Twain Harte Times - Twain Harte, CA - The closest you can get to Heaven on Earth Cranial Laser & Neurolymphatic Release Techniques (CLNRT) - Experience dramatic pain reduction At Summit Chiropractic our mission is to improve your quality of life - We know that health is much more than just not feeling pain Visit to learn about your preschool options.