This is a migrated thread and some comments may be shown as answers.

Onclick does not fire when i close a Radwindow with OnClientClick

1 Answer 126 Views
Window
This is a migrated thread and some comments may be shown as answers.
Ronan BARRANGER
Top achievements
Rank 1
Ronan BARRANGER asked on 08 Mar 2012, 04:24 PM
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"/>

1 Answer, 1 is accepted

Sort by
0
Ronan BARRANGER
Top achievements
Rank 1
answered on 08 Mar 2012, 04:38 PM
Solution :
<asp:Button ID="Button1" runat="server" Text="Soumettre ce ticket"
            onclick="Button1_Click"  OnClientClick="CloseDialog();" 
            UseSubmitBehavior="false"/>
Tags
Window
Asked by
Ronan BARRANGER
Top achievements
Rank 1
Answers by
Ronan BARRANGER
Top achievements
Rank 1
Share this question
or