Posted By

Tamedo on 12/14/07


Tagged


Versions (?)

Who likes this?

6 people have marked this snippet as a favorite

vali29
sbbath
korzhik
jonhenshaw
chrisjlee
guo3823538


js popup window


 / Published in: JavaScript
 

  1. <SCRIPT LANGUAGE="JavaScript">
  2. function popUp(URL) {
  3. day = new Date();
  4. id = day.getTime();
  5. eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=400,height=500,left = 440,top = 150');");
  6. }
  7. </script>
  8. <a HREF="javascript:popUp('index.php')">Open the Popup Window</a>

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: jonhenshaw on September 22, 2008

Works like a charm!

Posted By: DonovanGlover on August 25, 2012

Eval is evil. :P

You need to login to post a comment.