SharePoint Custom Code (Submit/Cancel) button handling

SharePoint, XLS, ASP

Submit/Cancel buttons would like Submit to save but stay on same page

                                    <td class="ms-toolbar" nowrap="nowrap">
                                          <SharePoint:SaveButton runat="server" ControlMode="Edit" id="savebutton2"/>
                                    </td>
                                    <td class="ms-separator">
                                          <xsl:text xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" ddwrt:nbsp-preserve="yes" disable-output-escaping="yes">&amp;nbsp;</xsl:text>
                                    </td>
                                    <td class="ms-toolbar" nowrap="nowrap" align="right">
                                          <SharePoint:GoBackButton runat="server" ControlMode="Edit" id="gobackbutton2"/>
                                    </td>
Matt PinkstonAsked:
Who is Participating?
 
kukdaiCommented:
If you are trying to overwrite the submit button in a list may be this link gets you more idea
https://social.technet.microsoft.com/wiki/contents/articles/31330.sharepoint-using-presaveaction-function-on-custom-list-forms.aspx

the idea is to get the id of the button and use javscript to update the function to do something else

$('#some-form').submit(function(e) {
//try writing your code here

another idea is create a link and add source parameter in the URL at the end "&Source="your URL""
0
 
Matt PinkstonAuthor Commented:
the article helped thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.