Jump to content

Make animated HTML5 iframe from a client clickable


Recommended Posts

Hi all,

We have received a HTML streaming banner (served on another domain) with a sound on mouse hover. A straight URL for a Halfpage Ad.
The only way I saw implementation was via an iframe.

To track clicks I put a <a href="{clickurl}https://www.target.com" /></a> tag above the iframe which has the size of the iframe (through CSS, display: block; position: absolute; width: 300px; height: 600px;). So it's basically a layover for the iframe. Now I can create my own URL and the correct target URL.

Problem is, that the mouse over to activate the sound doesn't work anymore. As the mouse is hovering over the field created by the <a href="" /> which coves the iframe below. Do i move the link behind the iframe the hover works but the click doesn't work of course.

I have experimented with Javascript onlick to append CSS classes like z-index, so that in the moment of the click the link would jump in the front of the iframe and the click would work and could be tracked. Also playing around with the style pointer-events: none; didn't work. Of course the hover sound works but not the click (no pointer events). Lastly iframes do not support Javascript onlick. Airball too! :/

So I didn't really find a practical approach how to wrap a link around an iframe with an add served from another domain, while still keeping the hover possibilities of the animated HTML5 banner active.

Does anyone have an idea?

Thank you.

Edited by sepalot
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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