I will run a series of articles to list down necessary objects and functions provided by SharePoint. I hope you will find them useful.
JSRequest : It is a global object which is used to get information about current page. It has following properties:
- QueryString : An array of Querystring key and values,
- FileName : Name of the current file e.g. default.aspx
- PathName : current path of the page
NOTE: Before using this object properties, always call JSRequest.Ensuresetup()
L_Menu_BaseUrl : Relative path for current site. e.g. “/TestSite”. It is useful to construct web relative paths for ajax calls of web services etc.
L_Menu_LCID : Current culture Id e.g. “1033” for US English. It is useful to retrieve culture specific files, if need.
L_Menu_SiteTheme : Current site theme name e.g. Lacquer. If no theme is applied then it will be empty.
browseris : This object has several properties to detect browser name, major and minor version, operating system version etc. For example, if you want to know whether the current browser is IE or not then check browseris.ie. If it is true then IE else others. To get full details of its properties, use FireBug.
LegalUrlChars : Array of all characters which are allowed in Url for SharePoint.
_spUserId : User Id of the currently logged in user. It is an integer e.g. 1. You can use this value perform any logic against a currently logged in user.
ctx or ctx1 or ctx2 … etc. There can be many ctx objects in a single page. These objects are instances of ContextInfo class. They are used to provide user context information necessary to create Edit Control Block menu items. Please use FireBug to see the list of all properties available. Visit here for more info
g_ExtensionDefaultForRead : An array of file extension strings which are always checked out as Read only. For example, jpg, jpeg, bmp etc.
g_ExtensionNotSupportCheckoutToLocal : An array of file extension strings which are not allowed to checkout locally. For example, aspx, ascx, cmd etc.