call livecode function from html ?

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
fre
Posts: 41
Joined: Fri Nov 12, 2010 7:22 pm

call livecode function from html ?

Post by fre » Tue Jan 11, 2011 6:01 pm

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

Klaus
Posts: 14194
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: call livecode function from html ?

Post by Klaus » Tue Jan 11, 2011 6:17 pm

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

fre
Posts: 41
Joined: Fri Nov 12, 2010 7:22 pm

Re: call livecode function from html ?

Post by fre » Wed Jan 12, 2011 12:06 pm

thank you klaus, that was what i searched for.
best regards
fred.

Post Reply