Posts

Showing posts with the label Global Variables

Useful JavaScript global variables in SharePoint

If youā€™re using custom JavaScripts with SharePoint 2010 some global JavaScript variables may come in handy. These variables work if youā€™re using SharePointā€™s default or any other custom master page.  L_Menu_BaseUrl ā€“ the base URL of the site / subsite. Very useful when you need to determine the absolute path of the site in JavaScript. Example: document.location = L_Menu_BaseUrl + ā€˜lists/calendar/allitems.aspxā€™ //redirects to Calendar list  L_Menu_LCID ā€“ the LCID of the site youā€™re in. Useful if you need to determine the language of the site. The list of Locale IDs can be found here .   _spUserId ā€“ the ID of the logged in user.