JavaScript on click of Finish Button in Survey – SharePoint

Hi,

We had created a survey and wanted some message to appear when user clicks on finish button.

Through one of my colleague i came to know about this function — PreSaveAction

function PreSaveAction()
{
alert(“Thanks for the participating in the survey!”);
return true;
}

Placing the above function in the newform.aspx using SharePoint designer  did the trick.

We could use the PreSaveAction function for custom validation as well !

http://edinkapic.blogspot.com/2007/10/add-javascript-date-validation-into.html

Bye..


Author: Nishant Rana

I love working in and sharing everything about Microsoft.NET technology !

2 thoughts on “JavaScript on click of Finish Button in Survey – SharePoint”

  1. how about if we want to validate the answers when the user clicks the “Next” button?
    What should be the name of the function we should call?

    Like

Share your thoughts

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s