Open Window after ONE click (only one)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Rambaldi
    New Member
    • Mar 2007
    • 42

    Open Window after ONE click (only one)

    Why only one?

    Well, what has been happen to me is that the window just pop up after the second click and i dont know why this is happening.

    The code inside the link button is:

    Code:
     protected void CicloCamLink_Click(object sender, EventArgs e)
    {
    string openWindow = @"window.open('CicloCamarasWindow.aspx','anycontent','width=455,height=435,resizable=1')";
     
    CicloCamLink.Attributes.Add("onclick", openWindow);
    }
    Someone knows why this is happening?

    Thanks in advance.
    Last edited by DrBunchman; Jun 3 '08, 10:40 AM. Reason: Moved to .NET Forum - ASP Forum for Classic ASP only
  • shweta123
    Recognized Expert Contributor
    • Nov 2006
    • 692

    #2
    Hi,

    This is happening because you have written the code in "CicloCamLink_C lick" procedure. You should write the Openwindow code Page_Load() procedure.

    Originally posted by Rambaldi
    Why only one?

    Well, what has been happen to me is that the window just pop up after the second click and i dont know why this is happening.

    The code inside the link button is:

    Code:
     protected void CicloCamLink_Click(object sender, EventArgs e)
    {
    string openWindow = @"window.open('CicloCamarasWindow.aspx','anycontent','width=455,height=435,resizable=1')";
     
    CicloCamLink.Attributes.Add("onclick", openWindow);
    }
    Someone knows why this is happening?

    Thanks in advance.

    Comment

    • Rambaldi
      New Member
      • Mar 2007
      • 42

      #3
      Thanks for the help []

      Comment

      Working...