deny iframe javascript to scroll parent window
Posted
by gucki
on Stack Overflow
See other posts from Stack Overflow
or by gucki
Published on 2010-03-24T14:07:50Z
Indexed on
2010/03/24
14:13 UTC
Read the original article
Hit count: 310
JavaScript
|scrolling
I've a site with banner ads, loaded using iframes. The banner ads always scroll the parent window when the banner doesn't complety fit into the visible region. This is really annoying and I'd like to deny the javascript of the iframes to scroll the main window.
Here is what I already tried:
Move the iframe src code to another domain. Normally js from another domain should not be allowed to access the parent window, is it?! This doesn't work.
Overwrite window.moveTo, window.scrollTo, window.scrollBy in parent with my own functions. This doesn't seem to work neither, as none of these functions seems to be called. :-(
Any help would be really great :-)
© Stack Overflow or respective owner