Show user the JavaScript error
Hi everyone
I have a case, where I'm doing everything for the Save button (Save and Redirect) in a JavaScript. Now I'd like to show the error message (if an error occurred) to the user. The best solution would be with a status bar.
Do you have any solution for this?
Thanks and best regards
Manuel Habert
0
-
Hi Manuel,
if you prefer using raw JavaScript, there is available Status class in sp.js and you can use something like this:
var statusMessageID = SP.UI.Status.addStatus("<Title>", "<Message>", false);
SP.UI.Status.setStatusPriColor(statusMessageID, 'red');
More info you can find by this link
As well you can use "Show Message" action from Action Links accelerator, by triggering click on link from JavaScript
0
Please sign in to leave a comment.
Comments
1 comment