onChangeSelection: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Conversion script moved page OnChangeSelection to onChangeSelection: Converting page titles to lowercase)
No edit summary
Line 6: Line 6:
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='onChangeSelection' type='macro' href='macroLink'>
<link rel='onChangeSelection' 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.

Revision as of 22:38, 14 March 2023

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.

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.

See Also

Forms tutorial#Events