Frameset show and hide : Frame FrameSet : HTML JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » HTML » Frame FrameSet »

 

Frameset show and hide



/*
JavaScript Application Cookbook
By Jerry Bradenbaugh

Publisher: O'Reilly 
Series: Cookbooks
ISBN: 1-56592-577-7
*/ 

 

           
       

// frames.js

function keepIn(parentHREF) {	
	if (top.location.href == self.location.href) {
		alert('[Wheez]. . .  [Gasp]. . . Must. . . load. . . original. . . frameset.');
		top.location.href = parentHREF;
		}
	}

function keepOut() {
	if (top.location.href != self.location.href) {
		alert('This document bows to no frameset.');
		top.location.href = self.location.href;
		}
	}


<HTML>
<HEAD>
	<TITLE>Need Frameset</TITLE>
<SCRIPT LANGUAGE="JavaScript1.1" SRC="frames.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript1.1">
<!--

keepIn('frameset2.html');

//-->
</SCRIPT>

</HEAD>
<BODY>
There.... that is much better.
</BODY>
</HTML>
Download : Download nav_FramesetShowHide.zip nav_FramesetShowHide.zip


-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo HTML
» Frame FrameSet