Mous-Over in Chromium

Post Reply
Stefan H
Posts: 2
Joined: Thu Mar 26, 2020 10:52 am

Mous-Over in Chromium

Post by Stefan H » Thu Mar 26, 2020 11:04 am

Hello

I'd like to display the real link on mouse-over (e.g. received e-mail), so the user can actually see which url is behind a hyperlink.
Is there any way to track the mouse-over and transfer the "href"-attribute of the Hyperlink back to Delphi to handle the display of the link otherwise?

Editing the html of the e-mail by setting the "href"-attribute on the "title"-attribute or using JavaScript to do so works, but is not a prefered solution.
Also using JavaScript does not work if the content is read only.

Best regards
Stefan

User avatar
salvadordf
Posts: 2223
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Mous-Over in Chromium

Post by salvadordf » Thu Mar 26, 2020 11:11 am

Hi,

That information is usually given in the "value" parameter of the TChromium.OnStatusMessage event.

If the web page doesn't trigger that event when he/she hovers the mouse over a link then you will have to use JavaScript to get the element under the mouse coordinates and send the "href" value to Delphi using a JavaScript extension.

Read the code comments in the JSExtension demo for all the details.

Stefan H
Posts: 2
Joined: Thu Mar 26, 2020 10:52 am

Re: Mous-Over in Chromium

Post by Stefan H » Thu Mar 26, 2020 1:54 pm

Hi,

thank you for the fast response.
I'll look into the OnStatusMessage event, maybe the event is triggered and I missed it.

Post Reply