Alisson 0 Posted October 19, 2023 (edited) I use TWEBBROWSER to insert data into a form . Application Delphi FMX Android. element type text not insert value string. HTML Page: <input type="text" name="txtCPF" id="txtCPF" size="18" maxlength="14" autofocus="" title="Informe os onze dígitos do número do CPF." onkeypress="javascript: return EntradaNumerico(event);" onfocus="javascript: RemoveMask('txtCPF');" onblur="javascript: FG_FormatarCPF('txtCPF');" autocomplete="off" value=""> I need insert into element 'TXTCPF' the value type string '02403989987' but if use the: wbConsultaCPF:TWebBrowser; wbConsultaCPF.EvaluateJavaScript('document.getElementById("txtCPF").value = "012345";'); Browser show just '012345' in white screen. In IOS Application, code works correctly. if use : wbConsultaCPF.EvaluateJavaScript('document.getElementById("txtCPF").value = 012345;'); browser show correct text in element value but cut the first zero. '12345'. wbConsultaCPF.URL := 'https://servicos.receita.fazenda.gov.br/servicos/cpf/consultasituacao/ConsultaPublica.asp'; Edited October 19, 2023 by Alisson Share this post Link to post
Remy Lebeau 1394 Posted October 20, 2023 Already covered on StackOverflow: https://stackoverflow.com/questions/77326298/trouble-inserting-text-value-into-html-input-with-twebbrowser-evaluatejavascript Share this post Link to post