Prevent Telerik Radbutton postback during form data validation

wizard_aja

New Member
My aim is to prevent page postback of the page,This I want to achieve using JQuery.\[code\]<script type="text/javascript" language="javascript"> $(document).ready(function() { $('#<%= btnAddAircraft.ClientID %>').click(function() { var Passengers = $('#<%= txtPassengers.ClientID %>').val(); if (parseInt(Passengers) == 0) { $('#<%= txtPassengers.ClientID %>').focus(); alert("Number of passengers should not be Zero."); return false; } }); });\[/code\]\[code\]<telerik:radbutton id="btnAddAircraft" onclick="btnAddAircraft_Click" validationgroup="P1" text="Add Aircraft" runat="server"> </telerik:radbutton> \[/code\]The Validation process occurs but cannot retain the control to prevent postback.
Note: This issue I have handled using 'OnClientClick' event of RadButton. But I want to work it out in my document.ready function.Regards,Vishal.
 
Back
Top