Put this on your potential 'orphan' page, in the head (configure its two highlighted variables):
Code:
<script type="text/javascript">
if (window == top)
(function(){
var framesetURL = 'index.htm'; //set to quoted address of the frameset page
var targetFrame = 'targetFrame'; //set to quoted name of the target frame on the frameset page
var w = window.location, url = framesetURL + '?frame=' + targetFrame + '&page=' +
(encodeURIComponent? encodeURIComponent(w.href) : escape(w.href));
w.replace? w.replace(url) : w.href = url;
})();
</script>
Put this on your frameset page, also in its head:
Code:
<script type="text/javascript">
;(function(){
var m, qv = function (n) {
m = (new RegExp('[?&;]' + n + '=([^&;#]*)')).exec(location.search);
return m? unescape(m[1]) : null;
}, f = qv('frame'), p = qv('page');
if(f && p){
window.onload = function(){
if(qv.fired) return;
f = window.frames[f].location;
f.replace? f.replace(p) : f.href = p;
qv.fired = true;
};
};
})();
</script>
Bookmarks