getcontrolbyname


in delphi i use this function to get an element by name



  function getControlByName (qform : twebform; qname : string) : tcontrol;
  var inta: integer;
  begin
  result := nil;
    for inta:= 0 to qform.ComponentCount - 1 do begin
      if qform.Components[inta].Name = qname then begin  result := (qform.Components[inta] as tcontrol); exit; end;
    end;
  end;


dont work here
How i can get an element by name ?

Not sure how you created the components on the form?
Did you give all components a name?

components  created at design time
yes components have name.

how i can get a control_by_name at run time ?

I cannot see an issue here.
Was retested with the latest version with a new project with a few controls dropped on it and the code


procedure TForm2.WebButton1Click(Sender: TObject);
var
  i: integer;
begin
  for i := 0 to ComponentCount - 1 do
    begin
      weblistbox1.Items.Add( self.Components.Name);
    end;
end;

and this shows all found components in the listbox

work now.
thanks

PS
if i give an elementid to a twebpanel , twebpanel.name dont appear in weblistbox

In this case, the parent of the panel is not set to the form, so technically, this panel is not a child of the form.