Luciano França Posted October 25, 2023 Share Posted October 25, 2023 I looked for it and couldn't find it on the forum, I think it's a simple thing. based on this topic: http://forums.unigui.com/index.php?/topic/24462-detect-cancel-opendialog-in-tunifileuploadbutton/ and I will use a "UniHTMLFrame" instead of "unifileuploadbutton" How do I need to simulate Click? UniHTMLFrame1.JSInterface.JSCall('fileInputEl.dom.click', []); // Error UniHTMLFrame1.JSInterface.JSCall('dom.click', []); // Error UniHTMLFrame1.JSInterface.JSCall('click', []); // Error UniHTMLFrame1.JSInterface.JSCall(UniHTMLFrame1.jsName + 'dom.click', []); // Error Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 25, 2023 Share Posted October 25, 2023 There were solutions on the forum, if I'm not mistaken, look for it. Quote Link to comment Share on other sites More sharing options...
Luciano França Posted October 25, 2023 Author Share Posted October 25, 2023 13 minutes ago, Sherzod said: There were solutions on the forum, if I'm not mistaken, look for it. I'm sorry I already did that How to do this search right on the forum I tried by terms "simulate Click UniHTMLFrame" ? "Click UniHTMLFrame" ? "Simulate Click" ? Quote Link to comment Share on other sites More sharing options...
Luciano França Posted October 25, 2023 Author Share Posted October 25, 2023 5 hours ago, Sherzod said: There were solutions on the forum, if I'm not mistaken, look for it. I believe the colleague is wrong and there is no solution for this I did a search just with the term "TUniHTMLFrame" and opened all the topics related to it and didn't find any solution. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 25, 2023 Share Posted October 25, 2023 Can you make a simple testcase for your case? We will try to check. Quote Link to comment Share on other sites More sharing options...
Luciano França Posted October 26, 2023 Author Share Posted October 26, 2023 2 hours ago, Sherzod said: Can you make a simple testcase for your case? We will try to check. Attached. FrameClick.7z Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 26, 2023 Share Posted October 26, 2023 3 hours ago, Luciano França said: FrameClick.7z 2.29 kB · 1 download 1. <button id="_customBtn" style="color:blue;font-size:12px;" 2. Procedure TMainForm.UniButton1Click(Sender: TObject); Begin UniSession.AddJS('document.getElementById("_customBtn").click()'); End; 1 Quote Link to comment Share on other sites More sharing options...
Luciano França Posted October 26, 2023 Author Share Posted October 26, 2023 5 hours ago, Sherzod said: 1. <button id="_customBtn" style="color:blue;font-size:12px;" 2. Procedure TMainForm.UniButton1Click(Sender: TObject); Begin UniSession.AddJS('document.getElementById("_customBtn").click()'); End; Wow, I was looking for a way to invoke Frame Click and my colleague did it in a much simpler way. Much obliged. Quote Link to comment Share on other sites More sharing options...
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.