Page 1 of 1

call livecode function from html ?

Posted: Tue Jan 11, 2011 6:01 pm
by fre
hallo,

i wonder if it is possible to call a livecode funtion from html code ?

for example:
i have a field and i set the HTMLText to
<a href="call foo function">foo</a>
is there a way to call a livecode funtion (or command) in that way ?

best regards
fred

Re: call livecode function from html ?

Posted: Tue Jan 11, 2011 6:17 pm
by Klaus
Hi Fred,

just add a "linkclicked" handler to your field!

Code: Select all

on linkclicked tLink
  switch tLink
  case "call foo function"
     get foo() ## or whatever
  break
  ...
 end switch
end linkclicked
Best

Klaus

Re: call livecode function from html ?

Posted: Wed Jan 12, 2011 12:06 pm
by fre
thank you klaus, that was what i searched for.
best regards
fred.