augusto.pellis 5 Posted February 12 Share Posted February 12 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 Quote Link to post Share on other sites
Sherzod 1180 Posted February 13 Share Posted February 13 7 hours ago, augusto.pellis said: I have embedded into our application a widget using a simple iframe tag. Hello, What kind of widget? Quote Link to post Share on other sites
andyhill 23 Posted February 14 Share Posted February 14 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; Quote Link to post Share on other sites
augusto.pellis 5 Posted February 15 Author Share Posted February 15 On 2/13/2021 at 1:07 AM, Sherzod said: Hello, What kind of widget? Hi Sherzod, it's an online calendar Quote Link to post Share on other sites
Sherzod 1180 Posted February 15 Share Posted February 15 4 minutes ago, augusto.pellis said: it's an online calendar Need more details. Quote Link to post Share on other sites
augusto.pellis 5 Posted February 15 Author Share Posted February 15 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 Quote Link to post Share on other sites
augusto.pellis 5 Posted February 15 Author Share Posted February 15 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 Quote Link to post Share on other sites
Sherzod 1180 Posted February 15 Share Posted February 15 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. Quote Link to post Share on other sites
augusto.pellis 5 Posted February 15 Author Share Posted February 15 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 Quote Link to post Share on other sites
Sherzod 1180 Posted February 15 Share Posted February 15 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. Quote Link to post Share on other sites
augusto.pellis 5 Posted February 15 Author Share Posted February 15 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 Quote Link to post Share on other sites
andyhill 23 Posted February 16 Share Posted February 16 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. Quote Link to post Share on other sites
augusto.pellis 5 Posted February 16 Author Share Posted February 16 @andyhill, I appreciate your tips. I hope that Sherzod might help with a workaround as well 🙂 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.