window.open question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dave

    #1

    window.open question

    I'm running the below script to open a popup window. Works great!
    I'd like to find out if there's a way to include Mouse Coordinates in
    the top and left parameters so that when my button is clicked, the
    popup opens in the same location.


    protected void btnLocateEmpID_ Click(object sender, EventArgs e)
    {
    StringBuilder sb = new StringBuilder() ;
    sb.Append("<scr ipt>");
    sb.Append("wind ow.open('Locate EmpID.aspx', '','toolbar=0,
    height=320,widt h=375,resizable =0,scrollbars=0 ');");
    sb.Append("</scri");
    sb.Append("pt>" );
    Page.RegisterSt artupScript("te st", sb.ToString());
    }



    Please be as descriptive as possible with your reply.

    Thanks for your help! ;-)

  • =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=

    #2
    RE: window.open question

    http://msdn2.microsoft.com/en-us/library/ms536651.aspx
    --

    unBlog: http://petesbloggerama.blogspot.com
    BlogMetaFinder: http://www.blogmetafinder.com



    "Dave" wrote:
    I'm running the below script to open a popup window. Works great!
    I'd like to find out if there's a way to include Mouse Coordinates in
    the top and left parameters so that when my button is clicked, the
    popup opens in the same location.
    >
    >
    protected void btnLocateEmpID_ Click(object sender, EventArgs e)
    {
    StringBuilder sb = new StringBuilder() ;
    sb.Append("<scr ipt>");
    sb.Append("wind ow.open('Locate EmpID.aspx', '','toolbar=0,
    height=320,widt h=375,resizable =0,scrollbars=0 ');");
    sb.Append("</scri");
    sb.Append("pt>" );
    Page.RegisterSt artupScript("te st", sb.ToString());
    }
    >
    >
    >
    Please be as descriptive as possible with your reply.
    >
    Thanks for your help! ;-)
    >
    >

    Comment

    • Dave

      #3
      Re: window.open question

      Peter, that link basically tells me what I already have in my original
      posting. Thank you all the same. My Original Posting says that the
      script I had worked Great. My original question...How Can I get
      "Mouse Coordinates" (X,Y) to include them as Left and Top parameters
      so that the popup window opens "where the button was clicked"? That
      link doesn't provide that.



      On Nov 10, 10:56 am, Peter Bromberg [C# MVP]
      <pbromb...@yaho o.NoSpamMaam.co mwrote:
      http://msdn2.microsoft.com/en-us/library/ms536651.aspx
      --http://www.eggheadcafe .com
      unBlog:http://petesbloggerama.blogspot.com
      BlogMetaFinder: http://www.blogmetafinder.com
      >
      >
      >
      "Dave" wrote:
      I'm running the below script to open a popup window. Works great!
      I'd like to find out if there's a way to include Mouse Coordinates in
      the top and left parameters so that when my button is clicked, the
      popup opens in the same location.
      >
      protected void btnLocateEmpID_ Click(object sender, EventArgs e)
      {
      StringBuilder sb = new StringBuilder() ;
      sb.Append("<scr ipt>");
      sb.Append("wind ow.open('Locate EmpID.aspx', '','toolbar=0,
      height=320,widt h=375,resizable =0,scrollbars=0 ');");
      sb.Append("</scri");
      sb.Append("pt>" );
      Page.RegisterSt artupScript("te st", sb.ToString());
      }
      >
      Please be as descriptive as possible with your reply.
      >
      Thanks for your help! ;-)- Hide quoted text -
      >
      - Show quoted text -

      Comment

      • Chris Shepherd

        #4
        Re: window.open question

        Dave wrote:
        Peter, that link basically tells me what I already have in my original
        posting. Thank you all the same. My Original Posting says that the
        script I had worked Great. My original question...How Can I get
        "Mouse Coordinates" (X,Y) to include them as Left and Top parameters
        so that the popup window opens "where the button was clicked"? That
        link doesn't provide that.
        It's kind of messy in implementation on a per-browser basis.

        Scroll down until you see the Mouse Position heading.



        Chris.

        Comment

        Working...