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 Dec 8 2009 at 6:45 PM by sympmarc, version 4
Comments
No comments yet.

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