Function

$().SPServices.SPGetCurrentSite

Functionality

This utility function, which is also publicly available, simply returns the current site's URL. It mirrors the functionality of the WebUrlFromPageUrl operation.

Syntax

$().SPServices.SPGetCurrentSite();

Example

var thisSite = $().SPServices.SPGetCurrentSite();

Available Options

None

Returns

The current site URL as a string. For example, if the current page is:
http://servername/sitename/Pages/default.aspx or
http://servername/sitename/Shared%20Documents/Forms/EditForm.aspx or
http://servername/sitename/Lists/Calendar/NewForm.aspx
the function will return:
http://servername/sitename
Last edited Oct 22 at 5:19 AM by sympmarc, version 3
Comments
No comments yet.

Updating...
© 2006-2009 Microsoft | About CodePlex | Privacy Statement | Terms of Use | Code of Conduct | Advertise With Us | Version 2009.10.27.15987