I need to populate a message or a display a dialog box when Save Button click triggers within my newform.aspx's PreSaveAction is called and redirect to allitems.aspx
page for viewing the latest inserted item.
Is it possible through jQuery ?I am already referencing jquery 1.6.0 in my function and not used the jquery-UI plugins.
I know plugins are available for displaying the dialog box, but never used within SP 2010 environment.
I tried the below code, but somehow it didn't work.
if(flagGeneric == false)
{
alert('please fill mandatory fields');
return false;
}
else
{
alert('Valdiations are done! Going to save the form ');
var msg = "New Opportunity been created successfully!";
sec = 10;
Notify(msg, sec)
return true;
}
var notifyId = null;
function Notify(msg, sec) {
notifyId = SP.UI.Notify.addNotification(msg, true);
setTimeout(function () {
SP.UI.Notify.removeNotification(notifyId);
notifyId = '';
}, (sec == null ? 1500 : sec));
}
Enhanced rich text type field
and when I tried to validate using jQuery , it didn't work and alert message popped up and SP's default mandatory error message being populated which is wrong in my case.Can you tell how to validate the enhanced rich text within the PreSaveAction call using js or jQuery?