onChangeImpersonated: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Conversion script moved page onChangeImpersonated to OnChangeImpersonated without leaving a redirect: Converting page title to first-letter uppercase)
No edit summary
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Languages|onChangeImpersonated}}
This event is triggered whenever the user changes which token is impersonated.
This event is triggered whenever the user changes which token is impersonated.


Line 6: Line 7:
Create a frame that has this special html tag in it:
Create a frame that has this special html tag in it:


<source lang="html4strict">
<syntaxhighlight lang="html4strict">
<link rel='onChangeImpersonated' type='macro' href='macroLink'>
<link rel='onChangeImpersonated' type='macro' href='macroLink'>
</source>
</syntaxhighlight>


Replace {{code|macroLink}} by an actual macroLinkText-call to a macro of your choice (the returned value of {{func|macroLinkText}}). A common practice is to call the frame opening macro itself to actualize the content.
Replace {{code|macroLink}} by an actual macroLinkText-call to a macro of your choice (the returned value of {{func|macroLinkText}}). A common practice is to call the frame opening macro itself to actualize the content.
Line 20: Line 21:
[[Forms tutorial#Events]]
[[Forms tutorial#Events]]
[[Category:Event]]
[[Category:Event]]
[[Category:Macro Function]]
{{Languages|onChangeImpersonated}}

Latest revision as of 23:59, 8 September 2024

Languages:  English  • 日本語

This event is triggered whenever the user changes which token is impersonated.

As a frame-based event, a frame containing the event code has to be opened.

Set up

Create a frame that has this special html tag in it:

<link rel='onChangeImpersonated' type='macro' href='macroLink'>

Replace macroLink by an actual macroLinkText-call to a macro of your choice (the returned value of macroLinkText()). A common practice is to call the frame opening macro itself to actualize the content.

No arguments are passed to the event, so to find the impersonated token we have to call getImpersonated():

[h: vImpersonated = getImpersonated(1)]

See Also

Forms tutorial#Events

Languages:  English  • 日本語