Advertisement
vincecudz

auto-popup-with-delay

Jun 28th, 2013
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script language="JavaScript">
  2. closetime = 0;
  3. function Start(url, width, height) {
  4. windowprops = "left=308,top=50,width=" + width + ",height=" + height;
  5. preview = window.open(url, "preview", windowprops);
  6. if (closetime) setTimeout("preview.close();", closetime*1000);
  7. }
  8. function doPopup() {
  9. url = "http://support.jotform.com/form/31635743230852";
  10. width = 750;  // width of window in pixels
  11. height = 600; // height of window in pixels
  12. delay = 5;    // time in seconds before popup opens
  13. timer = setTimeout("Start(url, width, height)", delay*1000);
  14. }
  15. </script>
  16. <body OnLoad="doPopup();">
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement