SharePoint 2013 - Open folder in new window
Override the HandleFolder function in a Script Editor web part so that folders in a document library open in a new window.
A forum question asked how to open folders in a document library in a new window. The solution is to override the HandleFolder function.
Edit the page, add a Script Editor web part and use this script:
js
function HandleFolder(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) {
var parts = new Array();
parts = c.toLowerCase().split('%2f');
c = c.replace('SitePages/Home.aspx', parts[1]);
window.open(c);
return false;
}
Clicking a folder now opens it in a new window and the current page stays as it is.