Showing posts with label redirection on submit. Show all posts
Showing posts with label redirection on submit. Show all posts

Wednesday, July 25, 2012

Sharepoint form redirection


<script type="text/javascript" src="SITE/Images1/jquery-1.3.2.min.js%22%3E%3C/script>
<script type="text/javascript">
fields = init_fields();
// Where to go when cancel is clicked
goToWhenCanceled = 'http://sharepoint.apps.anz/teams/BHS/UnOccupied-Thanks.aspx';
// Edit the redirect on the cancel-button's
$('.ms-ButtonHeightWidth[id$="GoBack"]').each(function(){
    $(this).click(function(){
   STSNavigate(goToWhenCanceled);
   })
});
function init_fields(){
  var res = {};
  $("td.ms-formbody").each(function(){
   if($(this).html().indexOf('FieldInternalName="')<0) return;
   var start = $(this).html().indexOf('FieldInternalName="')+19;
   var stopp = $(this).html().indexOf('FieldType="')-7;
   var nm = $(this).html().substring(start,stopp);
   res[nm] = this.parentNode;
  });
  return res;
}
</script>


Followers

No Locks without Key

🌿 Bible Verse 1 Corinthians 10:13 "No temptation has overtaken you except what is common to mankind. And God is faithful; ...

Who Am I?

My photo
What is mankind that you are mindful of them, human beings that you care for them? Psalms 8:4 But he made us a little lower than Angels and Crowned with Glory and Honor. How majestic is your name in all the Earth Oh Lord our God!