Please check this
http://msdn.microsoft.com/en-us/library/gg509060.aspx#BKMK_GetSaveMode
function preventAutoSave(econtext) {
var eventArgs = econtext.getEventArgs();
if (eventArgs.getSaveMode() == 1) {
// TO DO
}
}
Hope this helps. If you get answer of your question, please mark the response as an answer and vote as helpful !
Vikram !