2 issues with TTMSFMXWebBrowser

Hi,


on my form I have two buttons and the Webbrowser component with following logic:

procedure TForm1.Button1Click(Sender: TObject);
begin
  WB1.LoadHTML('<html><body>'+
  '<a href="#target">TEST1</a>'+
  ' <form><input type="text" id="aaa" value="Hello World!"></form>'+
  '</body></html>');
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  Showmessage(WB1.ExecuteJavascript('document.getElementById("aaa").value'));
end;

procedure TForm1.WB1NavigateComplete(Sender: TObject;
  var Params: TTMSFMXCustomWebBrowserNavigateCompleteParams);
begin
  Showmessage(WB1.URL + ' ' + Params.Url);
end;

Button 1 loads html code into the webbrowser and shows a link and an input field.

Issue 1: While clicking on the link, I expect to see the text "#target" in the message dialog but only "about:blank" is shown.

Issue 2: By clicking on button 2 I want to show the value of the input with the ID "aaa" but an empty string is shown.

I am using Delphi XE6.

Kind regards
Andre

Hi, 


1) We are seeying about:blank#target which is the expected behaviour when loading a plain text HTML. The about:blank is used to initialize the underlying webbrowser.
2) This is currently not possible. The result of executing HTML cannot be captured currently. This is a shortcoming in the underlying TWebBrowser.

Hi


1) On Windows 10, Delphi XE6 Prof. TMS 3.6.2.1 
about:blank is returned, without the hash tag

2) ExecuteJavascript is defined as Function with result type String. Also the implemention of this function gives the impression you can get the result as String.
Do you know this blog post http://delphiworlds.com/2013/11/adding-javascript-processing-capability-to-twebbrowser-in-ios/ ?
It seems somehow possible. Is there any other possibility to get the values of inputs?

Kind regards
Andr?

Hi, 


1) TTMSFMXWebBrowser is full features are supported starting from XE8
2) for iOS, this should already be implemented. For Windows, catching the result is currently not implemented, therefore the function ExecuteJavascript only returns a value under iOS and macOS.

Hi,


thanks for the info. I will create a feature request for getting the result of ExecuteJavascript on Windows operation systems.

Kind regards
Andr?