Foros‎ > ‎Sharepoint‎ > ‎

Search results url redirect - DispForm.aspx

publicado a la‎(s)‎ 4 abr. 2014 13:29 por Ignacio Gonzalez

One solution is a simple JavaScript redirect in a content editor webpart in the DispForm.aspx:

<script type="text/javascript">

function redirectForm() {
var pagemode = GetUrlKeyValue('DisplayMode', false);

if(pagemode == null || pagemode == "")
	{
         var hrefCurrent = window.location.href;
         var hrefNew = hrefCurrent.replace("DispForm.aspx","CustomForm.aspx");	   
	   window.location.href = hrefNew;
	}
}
ExecuteOrDelayUntilScriptLoaded(redirectForm, "sp.js");</script>
Comments