onAfterSave

fires after a server-side response has been received and processed

void onAfterSave(object response,id id,object details);
responseobjecta JSON object with details of a server-side response
ididthe ID of the related item
detailsobjectan object which holds details of data saving

Example

dp.attachEvent("onAfterSave", function(response, id, details){
    //code
});

Details

1 . The response parameter is a server response that contains the server-side item ID, status (the operation type) and other properties, e.g.:

  • id - old ID (client-side);
  • newid - new ID (server-side);
  • sid - old ID (client-side);
  • tid - new ID (server-side);
  • status - status of the operation ("insert", "update", "delete");
  • type - operation type ("insert", "update", "delete");
  • value - saved data value.

2 . The id parameter is the old (clientside) item ID. It will differ from the serverside ID if the item was added.

3 . The details parameter contains data saving details, e.g.:

  • data - object with the information about the action performed;
  • loader - Ajax loader object;
  • text - full text of server-side response.

In case of an "error" or "invalid" status during saving, the onAfterSaveError event fires instead.

See also
Back to top