Results 1 to 2 of 2

Thread: Centering a JavaScript Popup Window

  1. #1
    Join Date
    Mar 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Centering a JavaScript Popup Window

    Hey guys, I have found a code to make a popup window but it doesnt appear centered..like in the middle of the screen, horizontally and vertically..

    here is the code..i hope someone can help me

    Code:
    <SCRIPT LANGUAGE="JavaScript">
    <!-- William / Begin
    function popUp(URL) {
    day = new Date();
    id = day.getTime();
    eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=345,height=170,left = 50,top = 170'); ");
    }
    // End -->
    </script>
    <p><div align="center"><a href="javascript:popUp('web.com/play.html')"><img alt="" src="http://web.com/listen.png" align="" border="0"></a></p>
    Thanks! I will appreciate it.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,069
    Thanks
    44
    Thanked 3,216 Times in 3,178 Posts
    Blog Entries
    12

    Default

    Last edited by jscheuer1; 03-28-2009 at 06:32 AM.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •