Redirect to a Different page from a Web Part Zone in SharePoint

Recently I had a problem with redirect to an another SharePoint page.
The problem was when I try to click on a Report publish from the PerformancePoint, it opens the redirected page in the same zone, not in the same window.
To overcome that I used a javascript. The approach I used was, have .aspx page which contains the javascript to redirect to the requested url and call that .aspx by passing a parameter when the report is clicked. The aspx page is located in the Root of the PPSMonitoring site. You can find the path of the Root folder by right clicking on the PPSMonitoring site in IIS and select Explore as shown below.



Then add the redirect.aspx page (according to my sample) which contains the below code.





What this javascript do is it gets the parameter passed by the clicked page and set the redirected url. Then it set the parent page url as the redirecting page url. The reason to set the parent url is that when the request comes from a Zone, it consider the Window as the Zone. Therefore we have to set the redirecting url to the Parent page url.

No comments:

Post a Comment

How to run UPDATE/INSERT/DELETE Statements on Azure SQL Database in Microsoft Fabric Notebook...

You can run UPDATE/INSERT/DELETE Statements on Azure SQL Database in Microsoft Fabric Notebook using Python SQL Driver - pyodbc.  For the Fa...