|
<< Click to Display Table of Contents >> Navigation: Forum > The visibility of variables |
09-09-2020, 02:52 AM:
Please help me. I can't figure out how to see (use) the variable described in the program in a JavaScript script. For example:
Public
mTextToPrint: String;
.....
procedure TfmViewCheck.IWAppFormShow(Sender: TObject);
begin
mTextToPrint := '????? ??? ??????';
end;
???? JavaScript :
alert (mTextToPrint); - does not work
09-09-2020, 04:52 PM:
Hi, you need to create a JS var:
Code:
procedure TfmViewCheck.IWAppFormShow(Sender: TObject);
begin
Self.JavaScript.Add('var mTextToPrint = "????? ??? ??????"');
end;
???? JavaScript :
Code:
alert (mTextToPrint);
09-09-2020, 04:59 PM:
Thanks! It works!