PDA

View Full Version : how can I catch server-side error or success information



priyan_kj
14 Jun 2007, 12:34 AM
Hi

i am calling server action like below

msglocationtemp.load(
{
url: 'ShowQ3TasksAction.do', // <-- replace with your url
params: "name=" + "showQ3" ,
text: "Updating..." ,
callback: function (){
Ext.get('emptylocation').on('click', selectemptylocation);
Ext.get('closealert').on('click', closetask);
return true;
}
}
);
After transaction
how can I catch server-side error or success information.Basically i want to call different functions based on the return type.

ryanthe
14 Jun 2007, 2:16 AM
public function load(String/Function url, [String/Object params], [Function callback], [Boolean discardUrl])

# callback : Function
(optional) Callback when transaction is complete - called with signature (oElement, bSuccess, oResponse)

by taking parameter no 2 (bSuccess) you can use it

priyan_kj
14 Jun 2007, 3:39 AM
Thanks yar ...........Thank you very much