Mega Code Archive

 
Categories / JavaScript DHTML / HTML
 

Handling Load Events in a Layout Document

<HTML> <HEAD> <TITLE>Handling load events in a layout document</TITLE> <SCRIPT LANGUAGE="JavaScript"><!-- function selectFrames(){  base="frames/"  newFrames=new Array("http://www.rntsoft.com","http://www.rntsoft.com","http://www.rntsoft.com","http://www.rntsoft.com","http://www.rntsoft.com")  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="http://www.rntsoft.com" NAME="firstFrame"> <FRAME SRC="http://www.rntsoft.com" NAME="secondFrame"> </FRAMESET> </HTML>