Pages

Wednesday 14 August 2013

Full URL of your SharePoint 2013 site in JavaScript


If you want to use the Full URL of your SharePoint site in JavaScript, you can simply use the below window property. "window.location.protocol + '//' + window.location.host;"
For site collection and webs Server Relative URL use "_spPageContextInfo.siteServerRelativeUrl" and "_spPageContextInfo.webServerRelativeUrl"


Read more: Learning SharePoint

Popular Posts