Hi all,
I have to cancel the save button's original event to be ignored through the javascript.
Here is the scenario:
I have to cancel the save event in PWA 2010 timesheet page, when particular custom validation fails.
I have the code which does the validation in javascript and returns the true/false for the validation.
Now the thing is , I want to cancel the Save event when validation fails.
I tried returning the 'false', but did not work......
In 2007, we had used something like...
var save = LocateElementByTagID('input', 'idSaveBtn');var oldSave = save.onclick;// Replacement Save handlerfunction TimeSheetSaveOnClick() {var valid = CustomValidation();if (!valid) window.event.returnValue = false;else oldSave();return; }
Since the way of handling the button is moved to Ribbon, is it possible to do the same thing in 2010?
Please let me know if there is a way.... or if you had already done similar to this...
please ask me if there is more details required....
Thanks...
Muniappan