How to send Delphi parameter to JavaScript?

0
procedure TForm2.Button1Click(Sender: TObject);
var arquivo : string;
begin
  arquivo := 'teste.pdf'; 
  WebBrowser1.Navigate('C:\zLocal2016\src_Teste\PDF_atual\pdf\web\viewer.html');
end;

I need to pass the file variable that is in Delphi to the JavaScript of the page loaded in WebBrowser >.

    
asked by anonymous 27.09.2017 / 18:43

1 answer

0

I remembered the GET method of PHP and did so:

WebBrowser1.Navigate('C:\zLocal2016\src_Teste\PDF_atual\pdf\web\viewer.html?path=' + arquivo);
    
27.09.2017 / 19:45