Javascript popup window doesn't center

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

  1. spoofie

    spoofie

    Joined:
    Apr 9, 2008
    Messages:
    6
    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. Advertising

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. mjones
    Replies:
    0
    Views:
    1,153
    mjones
    Apr 6, 2007
  2. Simon Wigzell
    Replies:
    4
    Views:
    312
    Simon Wigzell
    Sep 15, 2003
  3. Jens Peter Hansen
    Replies:
    7
    Views:
    560
    Randy Webb
    Jun 19, 2004
  4. Raffi
    Replies:
    4
    Views:
    240
    Dr John Stockton
    Aug 12, 2004
  5. Jimmy
    Replies:
    3
    Views:
    459
    Henry
    Aug 16, 2007
Loading...

Share This Page