Hi,
I need to have some pieces of text which are contained in a line in a field and that are links, but when clicked on do not take the user away from the current screen, but instead call a function which will update the screen with the results of the function call.
Eg a line in the field could look like the below
some text "call x1" "call x2" "call x3" "call x4"
Clicking on "call x1" invokes the function with 1 passed as parameter. Clicking on "call x2" calls the same function with 2 passed as a parameter. And so on.
On the same screen the result of the function would be displayed.
I have found textStyle, and linkText, but these are for navigating away from the current card/screen?
Does anyone have any ideas how I could achieve what I am looking to do as described above?
Thanks as ever.
Gary
Links that call a function
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Links that call a function
Hi.
Though the field must be locked, the "linkClicked" message should do what you want. The clicked text has be grouped.You can distinguish which text is clicked on in several ways, the "linkText" is one, or you can get the "clickText" and roll your own,
Craig Newman
Though the field must be locked, the "linkClicked" message should do what you want. The clicked text has be grouped.You can distinguish which text is clicked on in several ways, the "linkText" is one, or you can get the "clickText" and roll your own,
Code: Select all
on linkClicked
--addYourFunctionOrCommandHere
end linkClicked
Last edited by dunbarx on Thu Oct 17, 2013 4:44 pm, edited 1 time in total.
Re: Links that call a function
That looks good, and the field will be a locked one. Thanks for the quick reply Craig.