JS Popup Window


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your 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 -->

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.