Popup Window Has 2 Pages Loaded Into It

[Total: 0    Average: 0/5]

This shows how to have 2 pages opened in sequence in the new popup window.

Body Code:

<script type=text/javascript> 
var myWin=null;
var DELAY=5000; // 5 seconds.
function newWin(urlLoc) { 
_winName = "MyNewWindow"; 
_info = "toolbar=no"; // yes|no 
_info += ",location=no"; // yes|no 
_info += ",directories=no"; // yes|no 
_info += ",status=yes"; // yes|no 
_info += ",menubar=no"; // yes|no 
_info += ",scrollbars=auto";// auto|yes|no 
_info += ",resizable=yes"; // yes|no 
_info += ",dependent"; // close the parent, close the popup, omit if you want otherwise 
_info += ",height=300"; 
_info += ",width=420"; 
_info += ",left=100"; 
_info += ",top=100"; 
myWin=window.open(urlLoc,_winName,_info); 
setTimeout("win2()",DELAY); 
} 
function win2() {
  alert("Going now to second page"); // remove this line after done testing this.
  myWin.document.location="http://www.js-examples.com/js/";
}
</script> 

<a href="javascript:newWin('http://www.js-examples.com/')">Open New Window</a><BR> 

Times Viewed: 0

Leave a Reply

Your email address will not be published. Required fields are marked *