PopUp Parameters

[Total: 0    Average: 0/5]

This example shows the different paramters that can be passed to a window.open() function call.

Body Code:

<script type=text/javascript> 
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=yes"; // 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";
  DispWin=window.open(urlLoc,_winName,_info);
} 
</script>
<a href="javascript:newWin('http://www.js-examples.com/');">ClickToOpenPopUp</a>

Times Viewed: 0

Leave a Reply

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