Jump to content

Double click on TUniHTMLFrame


Recommended Posts

Good morning everybody, I hope everyone's safe and sound.

I have embedded into our application a widget using a simple iframe tag. the HtmlFrame area loads and works exactly as expected.

We would like to double click into the frame area to perfomr an action (i.e. open a url into another browser page).

Can someone give me advices on how to do this?

I appreciate your help

Augusto

Link to post
Share on other sites

Perhaps this may help ...

CREATE
  InfoHTMLFrame.ClientEvents.ExtEvents.Clear;
  s:= 'dblclick=function dblclick(sender, eOpts) '#13#10+
      '{ '#13#10+
      '  ajaxRequest(MainForm.InfoHTMLFrame, ''_dblClick_'', []); '#13#10+
      '} ';
  InfoHTMLFrame.ClientEvents.ExtEvents.Add(s);

AJAX
procedure TMainForm.InfoHTMLFrameAjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings);
begin

  if EventName = '_dblClick_' then begin
    // Remember click event may also be fired so you will need to distinguish between click and dblClick perhaps using timing checks
  end;
 

Link to post
Share on other sites
On 2/14/2021 at 2:40 AM, andyhill said:

 

  if EventName = '_dblClick_' then begin
    // Remember click event may also be fired so you will need to distinguish between click and dblClick perhaps using timing checks
  end;
 

I'm sorry andyhill but the frameAjaxEvent is not fired.

Any other suggestions?

Augusto

Link to post
Share on other sites
44 minutes ago, augusto.pellis said:

I'm sorry andyhill but the frameAjaxEvent is not fired.

Any other suggestions?

Hello,

Please make a simple testcase and again indicate what should be done.

Link to post
Share on other sites
3 minutes ago, augusto.pellis said:

All I wish to accomplish, if possible, is detect any user action (i.e. doubleclick) on the html frame so I can, for example, open another form.

Exactly where?
Seems a single click is also assigned to the frame.

Link to post
Share on other sites
7 minutes ago, Sherzod said:

Exactly where?
Seems a single click is also assigned to the frame.

Well, the entire frame area I guess. I might also use a read only version of the link (https://teamup.com/ks7wrrnbheyq4wo8so) . I thought it was possible to intercept user actions before 'sending' them to the remote site but possibly I am wrong

 

Link to post
Share on other sites

A quick look shows me that this Calendar is an OnLine Calendar and therefore ALL user activity within this Calendar script interacts OnLine Only (no local activity, it appears that all local user events within the Calendar designated area are disabled).

This would require the likes of Sherzod to come up with a work around if possible.

You could have a Button/Label on the Form outside of the HTMLFrame to invoke a URL.

  

Link to post
Share on other sites

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...