R
R
Romanson2016-04-07 15:11:27
Delphi
Romanson, 2016-04-07 15:11:27

How to make form autocomplete on fmx delphi website?

this is how it is done for PC, but how to do it for FMX Android on Delphi?

var
A : Variant;
  SVal : String;
    ovElements: OleVariant;
  i: Integer;
  begin
 A := EmbeddedWB1.OleObject.Document.getElementById('theme');
  A.Value := 'old';
 
  ovElements := EmbeddedWB1.OleObject.Document.forms.item(0).elements;
  for i := 0 to (ovElements.Length - 1) do
    if (ovElements.item(i).type = 'submit') and
      (ovElements.item(i).Value = 'Переключить') then
      ovElements.item(i).Click;
 
 end;

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
Romanson, 2016-04-07
@Romanson

.OleObject.Document.forms.item(0).elements; there is no this OleObject parameter, I don’t understand what it was replaced with ... ???

D
Dmitry Entelis, 2015-03-04
@DmitriyEntelis

If the number of param_1 satisfying the condition is not very large (up to a thousand), then it is best to do it in 2 queries:

select distinct param_1 from table where param_3 is not null;
select * from table where param_1 IN (явное перечисление значений из прошлого запроса);

But in principle, the option Sergey
select * from table where param_1 IN (select param_1 from table where param_3 not null);
will also work, albeit slower

V
vadimstroganov, 2015-03-04
@vadimstroganov

Writing:

$sql = "select * from table where param_1 IN (select param_3 from table where param_3 not null)";
$r =  mysql_query($sql);
    while($row = mysql_fetch_array($r)) {
         echo $row['id'];    
    }

As a result, nothing is output
. Warning: mysql_fetch_array() expects parameter 1 to be resource

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question