Jump to content

How to simulate Click or Link on "UniHTMLFrame"


Luciano França

Recommended Posts

 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

Link to comment
Share on other sites

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.

 

03.png

Link to comment
Share on other sites

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;

 

  • Thanks 1
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • Luciano França changed the title to How to simulate Click or Link on "UniHTMLFrame"

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