Page 1 of 1

Mous-Over in Chromium

Posted: Thu Mar 26, 2020 11:04 am
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

Re: Mous-Over in Chromium

Posted: Thu Mar 26, 2020 11:11 am
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.

Re: Mous-Over in Chromium

Posted: Thu Mar 26, 2020 1:54 pm
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.