a.sanf Posted February 24, 2021 Share Posted February 24, 2021 Hi to everybody I have a html code on TuniURLframe as URLframe <!DOCTYPE html> <html> <body> <p>example id="demo".</p> <p id="demo"></p> <script type="text/javascript"> function myFunction() { document.getElementById("demo").innerHTML = "Hello World!"; } </script> </body> </html> And with a UniButton I want recall existing function "myFunction" I try with "URLframe.JSInterface.JSCall('myFunction', ['']) but it does not work. Any suggestions ? And if it were possible I would like to set a variable declared on the Javascript code from delphi. Is this possible ? Antonio Quote Link to comment Share on other sites More sharing options...
mhmda Posted February 24, 2021 Share Posted February 24, 2021 What exactly you want to do, please explain, maybe there is a better way to solve your issue? Quote Link to comment Share on other sites More sharing options...
a.sanf Posted February 24, 2021 Author Share Posted February 24, 2021 Hi mhmda I don't know if possibile, but I have HTML code with javascript, and a object TUniURLframe called in this example URLframe. After I have loaded the html page on TUniURLframe.HTML, I want (if possibile) call javascript function "myFunction" from delphi code, for example URLframe.JSInterface.JSAdd(etc..) or similar Thanks Antonio Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 16, 2021 Share Posted March 16, 2021 On 2/25/2021 at 3:15 AM, a.sanf said: I don't know if possibile, but I have HTML code with javascript, and a object TUniURLframe called in this example URLframe. After I have loaded the html page on TUniURLframe.HTML, I want (if possibile) call javascript function "myFunction" from delphi code, for example URLframe.JSInterface.JSAdd(etc..) or similar Hello, These posts may help you: Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.