Jump to content

UniHTMLFrame AfterScript Call Function


SEGNA

Recommended Posts

Hi,

I am writing a simple alert function in afterscript inside unihtmlframe. And when I try to call it at runtime with a button on the form, I get the undefined warning. It works when I write it inside the html string. But the field I need to use is aftersciprt, I have a different code running there.

UniHTMLFrame AfterScript;

function myFunction() {
  alert("Alert...");
}

Button Click Code;

procedure TMainForm.UniButton1Click(Sender: TObject);
begin
    UniSession.AddJS('myFunction()');
end;

 

How can i solve the problem?

Thank you.

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...