Return to Snippet

Revision: 57302
at May 24, 2012 17:38 by Hirsel


Initial Code
function getCurrentSpSite() {
var pageUrl= window.location.href;
var protocol = pageUrl.split("/")[0];
var tempFarm= pageUrl.split("//")[1];
var farm = tempFarm.split("/")[0];
return protocol +"//" + farm + L_Menu_BaseUrl ;
}

Initial URL

                                

Initial Description
without trailing slash

Initial Title
get Current SPSite

Initial Tags
sharepoint

Initial Language
JavaScript