Posted By

sdxxx on 12/03/10


Tagged

window popup


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

tirams
sdxxx


JS Popup Window


 / Published in: JavaScript
 

URL: http://javascript.internet.com/generators/popup-window.html

  1. <!-- TWO STEPS TO INSTALL POPUP WINDOW:
  2.  
  3. 1. Paste the first into the HEAD of your HTML document
  4. 2. Use the code to open the popup page on your site -->
  5.  
  6. <!-- STEP ONE: Copy this code into the HEAD of your HTML document -->
  7.  
  8. <HEAD>
  9.  
  10. <SCRIPT LANGUAGE="JavaScript">
  11. <!-- Idea by: Nic Wolfe -->
  12. <!-- This script and many more are available free online at -->
  13. <!-- The JavaScript Source!! http://javascript.internet.com -->
  14.  
  15. <!-- Begin
  16. function popUp(URL) {
  17. day = new Date();
  18. id = day.getTime();
  19. eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=600,height=400');");
  20. }
  21. // End -->
  22. </script>
  23.  
  24.  
  25. <!-- STEP TWO: Use the following link to open the new window -->
  26.  
  27. <A HREF="javascript:popUp('abc')">Open the Popup Window</A>
  28.  
  29. <!-- Script Size: 0.73 KB -->

Report this snippet  

You need to login to post a comment.