Onclick does not fire when i close a Radwindow with OnClientClick

2 posts, 0 answers
  1. Ronan BARRANGER
    Ronan BARRANGER avatar
    24 posts
    Member since:
    Mar 2010

    Posted 08 Mar 2012 Link to this post

    With this code, i try to Close a Window (the way i'm doing it works) but i have also an Onclick event which is ignored!

    <script type="text/javascript">
     
     
                 function GetRadWindow() {
                     var oWindow = null;
                     if (window.radWindow) oWindow = window.radWindow;
                     else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
                     return oWindow;
                 }
     
                 function CloseDialog() {
                     GetRadWindow().close();
                     
                 
                  
    </script>


    ASPX page:

               

    <asp:Button ID="Button1" runat="server" Text="Soumettre ce ticket"
                   onclick="Button1_Click"  OnClientClick="CloseDialog()"/>


    My application never enters Button1_click event, can anyone help me to find out why ?
    thanks in advance



    EDIT: HTML GENERATED FOR THE BUTTON
    <input type="submit" id="Button1" onclick="CloseDialog();" value="Soumettre ce ticket" name="Button1"/>

  2. Ronan BARRANGER
    Ronan BARRANGER avatar
    24 posts
    Member since:
    Mar 2010

    Posted 08 Mar 2012 Link to this post

    Solution :

    <asp:Button ID="Button1" runat="server" Text="Soumettre ce ticket"
                onclick="Button1_Click"  OnClientClick="CloseDialog();" 
                UseSubmitBehavior="false"/>

  3. DevCraft Release
Back to Top