2

Does any one knows how to show processing image after click on custom list default new form Save button until it completes process in sharepoint 2010, I need to show some processing image after Save button click until it completes its processing.

I implemented Event receiver to custom list so it is taking some secs of time to add list items. so I want to show some processing image during processing to add list items. Is it passing to show in ItemAdding() event or is it possible to show to javascript with function name PreSaveAction(). How can I do this. I don't have clear idea pls help

1

You could remove the OOTB click functionality and add your as below example:

$(document).ready(function() {

    var button = $("input[id$=SaveItem]");

        button.removeAttr("onclick");
        button.click(function() {
        //write your own implementation to show processing image
});

Source : http://adrianhenke.wordpress.com/2010/08/19/custom-redirect-after-creating-a-new-sharepoint-item/

0

If you check the inline javascript code of the save button, you'll see this bit of code:

onclick="if (!PreSaveItem()) return false;

If you look at the code of the PreSaveItem function, you'll see that it checks if a function called PreSaveAction is defined and if it is, calls it.

If you provide a function called PreSaveAction, you can hook into the Save button click event in a clean way and do whatever you want to do before releasing the control flow to the outer caller. This is typically used for custom, client side, form validation, but you can use it for other purposes as well, like in your case.

In order to show a progress indicator, you can make use of the OOB client side UI framework. Have a look here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.