Links that call a function
Posted: Thu Oct 17, 2013 4:32 pm
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
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