Handling Load Events in a Layout Document : Frame FrameSet : HTML : JavaScript DHTML examples (example source code) Organized by topic

JavaScript DHTML
C++
PHP


JavaScript DHTML  »  HTML   » [  Frame FrameSet  ]   
 



Handling Load Events in a Layout Document

Please note that some example is only working under IE or Firefox.


/*
Mastering JavaScript, Premium Edition
by James Jaworski 

ISBN:078212819X
Publisher Sybex CopyRight 2001
*/
<HTML>
<HEAD>
<TITLE>Handling load events in a layout document</TITLE>
<SCRIPT LANGUAGE="JavaScript"><!--
function selectFrames(){
 base="frames/"
 newFrames=new Array("red.htm","yellow.htm","blue.htm","green.htm","white.htm")
 window.firstFrame.location=base+newFrames[Math.round(5*Math.random())%5]
 window.secondFrame.location=base+newFrames[Math.round(5*Math.random())%5]
}
//-->
</SCRIPT>
</HEAD>
<FRAMESET
COLS="*,*" ONLOAD="selectFrames()" ONUNLOAD="alert('Thanks for stopping by!')">
<FRAME SRC="frames/grey.htm" NAME="firstFrame">
<FRAME SRC="frames/grey.htm" NAME="secondFrame">
</FRAMESET>
</HTML>

           
       
Related examples in the same category
1.  Parent window
2.  Window top frame
3.  Frame 'cols' Example
4.  'rows' Example
5.  'noResize' Example
6.  'frameElement' Example
7.  'frameBorder' Example
8.  'frameSpacing' Example
9.  Frameset in Javascript
10.  Create frameset
11.  Hide and Show Frame ExampleHas Download File
12.  Frameset for document.URL Property Reader
13.  Creating a Blank Frame
14.  A blank frameset with Javascript
15.  Get frame size
16.  Make new frameset
17.  Frameset NavigatorHas Download File
18.  Frameset show and hideHas Download File
19.  Multiple Search EngineHas Download File
























Home| Contact Us
Copyright 2003 - 04 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.