N
N
Nekit Medvedev2017-06-21 09:23:27
Delphi
Nekit Medvedev, 2017-06-21 09:23:27

How to fill in Delphi using TChromium?

This code is currently being used:

procedure TForm8.Button2Click(Sender: TObject);
var
NamePole:string;
CodeStr,s:string;
begin
s:=Memo1.text;
CodeStr := 'document.getElementById("'+DopText+'").value="'+s+'";' ;
Chromium1.Browser.MainFrame.ExecuteJavaScript(CodeStr, 'about:blank', 0);
end;

If instead of s you write the text on a straight line, then the filling goes.
What to do?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin Tsvetkov, 2017-07-23
@NIKROTOS

s:=Memo1.text;

s := StringReplace( Memo1.text, #13#10, ' ');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question