Sunday, 15 March 2015

javascript - OnClick not working when i use both Onclick & OnClientClick -



javascript - OnClick not working when i use both Onclick & OnClientClick -

with code, seek close window (the way i'm doing works) have onclick event 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; homecoming owindow; } function closedialog() { getradwindow().close(); }

aspx page:

<asp:button id="button1" runat="server" text="soumettre ce ticket" onclick="button1_click" onclientclick="closedialog();return false;"/>

my application never enters button1_click event, can help me find out why ? in advance

edit: html generated button

<input type="submit" id="button1" onclick="closedialog();" value="soumettre ce ticket" name="button1"/>

this article kind of explains problem. need homecoming true in js if want server event trigger. otherwise, have homecoming false.

and, looks have add together usesubmitbehavior = false based on: onclientclick , onclick not working @ same time?

this evident after seeing generated html has closedialog() , not phone call button1_click. alter concatenate end of onclick.

<asp:button id="button1" runat="server" text="soumettre ce ticket" onclick="button1_click" onclientclick="closedialog();" usesubmitbehavior="false"/>

javascript asp.net

No comments:

Post a Comment