SharePoint – Search results DispForm.aspx Redirect

November 22, 2013

When you do a search in SharePoint 2010 you get the results listed with a link to the Default DispForm.aspx.


But this opens up the ugly Standard Form.


While you might have put a lot of efforts in designing a Custom Form.


Solution is simple :

Add a redirect to the Standard Form to the Custom Form and you are done. Using the jQuery().SPServices library.


Code is here :

<script language="javascript" src="/sites/Scripts/jquery.SPServices-0.7.2.min.js"></script><script type="text/javascript">


// alert(jQuery().SPServices.Version());

// Get Activity ID from URL
   var queryStringVals = jQuery().SPServices.SPGetQueryString();
   var ID = queryStringVals["ID"];

//alert (ID);

var URL = '' + ID;

//alert ('We go to this ' + URL);

window.location.href = URL;

Enjoy !!