Jump to content

Recommended Posts

Posted

Please  ask me how do anything after main form show. I want to play music such in example "HTML5 Audio" and write

on UniFormShow

 

UniSession.SendResponse('audio2.load(); audio2.play();');

 

it raize error

 

I am attempt write in Client Evet afterrender

 

  audio2.load();
  audio2.play();
 

 

not work

 

 

on Ajax

 

procedure TMainForm.UniFormAjaxEvent(Sender: TComponent; EventName: string;
  Params: TStrings);
begin
  if EventName='afterrender' then
  begin

  UniSession.SendResponse('audio2.load(); audio2.play();');

  end;
end;

 

not work

 

Use TUniTimer

 

procedure TMainForm.UniFormAjaxEvent(Sender: TComponent; EventName: string;
  Params: TStrings);
begin
  if EventName='afterrender' then
  begin
  UniTimer1.Enabled := True;
  end;
end;

 

and 

 

procedure TMainForm.UniTimer1EventHandler(Sender: TComponent;  EventName: string; Params: TStrings);
begin
  UniSession.SendResponse('var ael=document.getElementById("audio2");ael.load();ael.play()');
end;

 

Timer event not fiered

 

Is exist event  fiered after form already show rendered ad?

 

 

 

 

 

 

 

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...