onChangeSelection: Difference between revisions
Jump to navigation
Jump to search
m (Conversion script moved page OnChangeSelection to onChangeSelection: Converting page titles to lowercase) |
m (Added Languages tag) |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{Languages|onChangeSelection}} | |||
This event is triggered whenever the user selects a token. | This event is triggered whenever the user selects a token. | ||
As a frame-based event, a frame containing the event code has to be opened. | As a frame-based event, a frame or overlay containing the event code has to be opened. | ||
== Set up == | == Set up == | ||
Create a frame that has this special html tag in it: | Create a frame that has this special html tag in it: | ||
< | <syntaxhighlight lang="html4strict"> | ||
<link rel='onChangeSelection' type='macro' href='macroLink'> | <link rel='onChangeSelection' type='macro' href='macroLink'> | ||
</ | </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 14: | Line 15: | ||
[[Forms tutorial#Events]] | [[Forms tutorial#Events]] | ||
[[Category:Event]] | [[Category:Event]] | ||
[[Category:Macro Function]] | |||
{{Languages|onChangeSelection}} |
Latest revision as of 23:59, 6 September 2024
This event is triggered whenever the user selects a token.
As a frame-based event, a frame or overlay containing the event code has to be opened.
Set up
Create a frame that has this special html tag in it:
<link rel='onChangeSelection' 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.