Jump to content

UniHTMLFrame how to run Javascript function


MOGSY

Recommended Posts

Hi

I have the following code in a UniHTMLFrame. I tried the following code from delphi to run the function. How should the call be made.

    HTMLFrame.JSInterface.JSCode(#1'.testFunction();');

 

Thank you.

 

<!DOCTYPE html>
<html>
<head>
    <title>Test</title>
</head>
<body>
    <b>TEST PAGE</b>
    <p>function name: testFunction</p>
</body>
<script type="text/javascript">
    function testFunction() {
        alert('THE TEST FUNCTION HAS BEEN RAN!');
    }
</script>
</html>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...