I've developed a static advert ticker that sits at the bottom of the window. This is in an <iframe>
to make it easier for other people to place the unit on their sites. Another <span>
around the <iframe>
keeps it fixed to the bottom of the screen. The script has a help window which is within a tag - within the <iframe>
and uses the visible / hidden property to show or hide text.
Now since the code is in an <iframe>
, the help text would not appear on main window. To get around this, I made the <iframe>
larger,and set it to transparent.
Visually, everything is fine. When the user clicks a button on the ticker, the help menu appears over the data in the background. However, I've just discovered that if there is a link on the main page that passes under the <span><iframe>
section, it cannot be clicked. I've tried CSS pointer-events, but can't get that to work, (links within the <iframe>
must also remain clickable)
Not sure which is causing the "fault", ie the <iframe>
or the tag around it. Is it a security thing to stop "click jacking" (??) or more to the point, is there a work around.
If push came to shove, I COULD reduce the size of the <iframe>
and use a javascript pop-up window to display help text, but those windows show the URL and status windows, and are not exactly elegant!
Here is the code before anyone asks:
This span covers the entire screen to the height of the underlying <iframe>
I did this so the data could be centred
<span style="position:fixed;bottom:10px;display:inline;width:100%">
<center>
<iframe src="http://www.xxx.com/cgi-bin/ticker/run_tick.pl?s=xzy" frameborder=0 align=top width=800px height=330px marginwidth=0 marginheight=0 hspace=0 vspace=0 scrolling=no allowtransparency=true></iframe>
</center>
</span>