Feb 02, 2012, 3:33 PM
[CLOSED] How to make server event firing conditional?
Hi,
I have the following code on the page:
Thanks,
Vadym
I have the following code on the page:
<ext:Button ID="ButtonSave" runat="server" Text="Save" Icon="Disk" Width="80">
<DirectEvents>
<Click Before="updateRecord(#{FormPanel1});" OnEvent="ButtonSave_Click" >
<EventMask ShowMask="true" />
</Click>
</DirectEvents>
</ext:Button>
What's the right approach to prevent the ButtonSave_Click event from firing if the form is invalid on the client, i.e. updateRecord() returns false or if it pops up a little form error window. Probably, there are other ways to achieve this behavior. Please suggest.Thanks,
Vadym
Last edited by Daniil; Feb 02, 2012 at 5:04 PM.
Reason: [CLOSED]