Search This Blog

Sunday, January 12, 2014

Redirect to different page on Cancel or Save button click in NewForm.aspx

  1. <script src="/sites/Vijai/SiteAssets/jquery.SPServices-0.7.2.min.js" type="text/javascript"></script>  
  2. <script src="/sites/Vijai/SiteAssets/jquery-1.8.3.js" type="text/javascript"></script>  
  3. <script type="text/javascript">      
  4.     $(document).ready(function(){  
  5.      $('input[value=Cancel]').click(function() {     
  6.         window.location.replace("http://www.google.com");  
  7.       });   
  8.      $('input[value=Save]').click(function() {       
  9.         window.location.replace("http://www.google.com");  
  10.       });  
  11.     });  
  12. </script>  

No comments:

Post a Comment