Function:
When a script is using an HTML generated form for the user interface, links may be created as buttons to control functions within the script.
Syntax:
The subroutine link is called as a normal HTML link except that page location is changed to the subroutine tag and name.
<a href="gosub:Subroutine_name"> Clickable link</a>
Example:
The following example and screenshot are from example 68.
<a href="gosub:procCancel">Cancel</a>
In this example a ‘cancel’ button is present in the HTML generated form. The link for the cancel button is called as a normal link, however instead of giving a link to a webpage it calls the procCancel subroutine located in the script.
Notes:
The example script 68 shown above also has the FormDisplayLinks variable set to true. This is shown with the gosub:procCancel visible in the lower left of the form image as the link has the cursor place over it.
The links may even be used to execute programs or perform other actions by having those commands be part of the subroutine.