Redirect SharePoint NewForm.aspx to "Thank you" page once user saved record.
Requirement : Redirect NewForm.aspx to "Thank you" page once user saved record. Add ThankYou.aspx at same location where NewForm.aspx is exist (I used SP2010 designer) Add below JavaScript in content editor web-part function PreSaveAction() { var URL = location.pathname.replace('NewForm.aspx','ThankYou.aspx'); if(GetUrlKeyValue('IsDlg')==='1'){ URL+="?IsDlg=1"; } $("#aspnetForm").attr('action',location.pathname+"?Source="+URL); return true; }