Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.

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 »

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: 4016
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Mous-Over in Chromium

Post by salvadordf »

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 »

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