Difference between revisions of "Global JavaScript Variables"

From AgileApps Support Wiki
imported>Aeric
 
imported>Aeric
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
The following JavaScript variables are ''global''. They are available in all JavaScript code running on the platform:
No JavaScript variables are currently defined.
<!--
The following [[JavaScript]] variables are ''global''. They are available in all JavaScript code running on the platform.


:;LJUserName:Name of the (logged in) User
:;Considerations:
:;LJPrimaryTeamName:Name of the [[Primary Team]] (user is a member of this team)
::* Variable names are case-sensitive
:;LJPrimaryTeamRoleName:[[Role Based Access Permissions|Role]] of the User in the Primary Team
::* In a [[Sites|Site]], no one is logged in, and the page is not running on the platform, so the variables have no meaning in that context.


;Considerations:
====User Variables====
:* Variables names are case-sensitive
:* '''LJUserName -''' Name of the (logged in) User
:* Since no one is logged in a [[Sites|Site]], the variables have no meaning in that context.
:* '''LJPrimaryTeamName -''' Name of the user's [[Primary Team]]
:* '''LJPrimaryTeamRoleName -''' Name of the user's [[Role]]
 
====Page Variables====
:;lj_window_src:
::Contains the URL of the current page. (Needs to be URL encoded when used.)
 
::;Sample Usage:
:::<syntaxhighlight lang="javascript" enclose="div">
encodeURIComponent(lj_window_src)
</syntaxhighlight><noinclude>
 
[[Category:JavaScript APIs]]
</noinclude>
-->

Latest revision as of 01:27, 14 October 2014

No JavaScript variables are currently defined.