How to call a function from html
Posted: Tue Sep 04, 2018 1:31 pm
I would like to call a function() from a link. Why doesnt work this with SpideBasic?
Code: Select all
Procedure MyFunc ()
Debug "You've clicked the link!"
EndProcedure
If OpenWindow(0, 0, 0, 270, 160, "TextGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
TextGadget(0, 0, 0, WindowWidth(0), WindowHeight(0), "")
txt.s = "<h3>Click Test</h3><p>Please click<a href=" + Chr(34) + "#" + Chr(34) + " onclick=" + Chr(34) + "MyFunc();" + Chr(34) + ">here</a>"
SetGadgetText(0, txt)
EndIf