augusto.pellis Posted February 12, 2021 Share Posted February 12, 2021 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 comment Share on other sites More sharing options...
Sherzod Posted February 13, 2021 Share Posted February 13, 2021 7 hours ago, augusto.pellis said: I have embedded into our application a widget using a simple iframe tag. Hello, What kind of widget? Link to comment Share on other sites More sharing options...
andyhill Posted February 14, 2021 Share Posted February 14, 2021 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 comment Share on other sites More sharing options...
augusto.pellis Posted February 15, 2021 Author Share Posted February 15, 2021 On 2/13/2021 at 1:07 AM, Sherzod said: Hello, What kind of widget? Hi Sherzod, it's an online calendar Link to comment Share on other sites More sharing options...
Sherzod Posted February 15, 2021 Share Posted February 15, 2021 4 minutes ago, augusto.pellis said: it's an online calendar Need more details. Link to comment Share on other sites More sharing options...
augusto.pellis Posted February 15, 2021 Author Share Posted February 15, 2021 1 minute ago, Sherzod said: Need more details. Sure. It's TeamUp embeddable calendar. https://www.teamup.com/ Work s perfectly into HTMLFrame, I just need to interact with it UniGui side when user dbl clicks on the frame area. I will try AndyHill suggestion in a while Link to comment Share on other sites More sharing options...
augusto.pellis Posted February 15, 2021 Author Share Posted February 15, 2021 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 comment Share on other sites More sharing options...
Sherzod Posted February 15, 2021 Share Posted February 15, 2021 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 comment Share on other sites More sharing options...
augusto.pellis Posted February 15, 2021 Author Share Posted February 15, 2021 5 hours ago, Sherzod said: Hello, Please make a simple testcase and again indicate what should be done. There you are. 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. Thank you! CalendarTest.zip Link to comment Share on other sites More sharing options...
Sherzod Posted February 15, 2021 Share Posted February 15, 2021 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 comment Share on other sites More sharing options...
augusto.pellis Posted February 15, 2021 Author Share Posted February 15, 2021 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 comment Share on other sites More sharing options...
andyhill Posted February 16, 2021 Share Posted February 16, 2021 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 comment Share on other sites More sharing options...
augusto.pellis Posted February 16, 2021 Author Share Posted February 16, 2021 @andyhill, I appreciate your tips. I hope that Sherzod might help with a workaround as well 🙂 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now