Javascript popup window doesn't center

Discussion in '.NET' started by spoofie, May 16, 2008.

  1. spoofie

    spoofie

    Joined:
    Apr 9, 2008
    Messages:
    6
    Likes Received:
    0
    I'm calling a popup window from my asp.net code behind file but the problem is that my window doesn't center.
    Can anyone help ?

    Here's my code:

    String popupscript = "<script language='javascript'>window.open('" +
    string.Format("ShowResume.aspx?profile={0}", gvwProfiles.SelectedDataKey.Value.ToString()) + "','Resume','location=1,status=1,resizable=1,scrollbars=1,width=800,height=600,left=((window.screen.width - 800) / 2),top=((window.screen.height - 600) / 2)');</script>;";
    ClientScript.RegisterStartupScript(this.GetType(),"ShowResumePopup",popupscript);
     
    spoofie, May 16, 2008
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?Sm9obiBXYWxrZXI=?=

    Popup Window Popup Timing

    =?Utf-8?B?Sm9obiBXYWxrZXI=?=, Nov 4, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    1,071
    =?Utf-8?B?Sm9obiBXYWxrZXI=?=
    Nov 4, 2005
  2. dapkniht
    Replies:
    1
    Views:
    1,510
    Eliyahu Goldin
    Mar 8, 2006
  3. mjones
    Replies:
    0
    Views:
    1,279
    mjones
    Apr 6, 2007
  4. Rajesh
    Replies:
    0
    Views:
    771
    Rajesh
    Jul 31, 2007
  5. Simon Wigzell
    Replies:
    4
    Views:
    422
    Simon Wigzell
    Sep 15, 2003
  6. Jens Peter Hansen
    Replies:
    7
    Views:
    846
    Randy Webb
    Jun 19, 2004
  7. Raffi
    Replies:
    4
    Views:
    445
    Dr John Stockton
    Aug 12, 2004
  8. Jimmy
    Replies:
    3
    Views:
    625
    Henry
    Aug 16, 2007
Loading...