Show/Hide TWebWaitMessage from Javascript

Hi,

How do I do this?

Thanks,

Ken

var 
  frmYourFormVar: TfrmYourForm; //assuming this declaration

pas.YourFormUnitName.frmYourFormVar.WaitMessage.Show$1();

Thanks but I couldn't get this to work. I did manage to achieve it using:

procedure TForm6.ShowMyWaitMsg;
begin
   WebWaitMessage.Show;
end;

procedure TForm6.btnNewContractClick(Sender: TObject);
begin
   asm
      this.ShowMyWaitMessage();
       ...
  end;
end;

Hi Ken,

I attached a sample project to show under different context, "this." method may not work for calling pas functions, for example if we need to call our pas function within some other pure JS object. But "pas.unitname..." method always works.
Projects.zip (11.3 KB)

1 Like

Thanks Mehmet.

You need to find the id of the wait message (i.e. what is the element id that maps to this in your example above)