Sep 19, 2008, 11:10 AM
ajaxresponse after button click
Hi there,
i have a button that throws an ajaxevent, the function server side do an "if" control and return an ajaxresponse.
here is the button code
Thanks
Lex
i have a button that throws an ajaxevent, the function server side do an "if" control and return an ajaxresponse.
here is the button code
<ext:Button AutoPostBack=false id="btnEroga_erog" runat="server" Text="Eroga" Icon=arrowright>
<AjaxEvents>
<Click Before="return confirm('Avviare l\'erogazione selezionata?')" OnEvent="StartErog" Failure="alert('no')" Success="alert('yes')">
</Click>
</AjaxEvents>
</ext:Button>
here is the function codeDim ar As New Coolite.Ext.Web.AjaxResponse(True)
if i = 0 Then
ar.Success = False
ar.Msg = "ko"
Else
ar.Success = True
ar.Msg = "ok"
End If
ar.MakeAnswer()
i always get a success response. how can i solve?Thanks
Lex