×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
1
 
0
Language: Javascript
Posted by: Massimo Zappino
Added: Jun 15, 2011 7:18 AM
Modified: Jun 15, 2011 7:19 AM
Views: 146
Tags: popup
  1. <script language="javascript">
  2. function openPopup(url, width, height, name)
  3. {
  4.     if (!name) {
  5.         name = 'mypopup';
  6.     }
  7.     var mywindow = "width=" + width + ",height=" + height;
  8.     popup = window.open(url, name, mywindow);
  9. }
  10. </script>
  11.  
  12. <a href="javascript:openPopup('popup.html', '320','260);">Open popup</a>
  13.