var iframes = document.getElementsByTagName('IFRAME'); for (var i = 0; i < iframes.length; i++) { iframes[i].style.display = 'none'; } Code (markup):
<script> if(location.href!=top.location.href){ top.location.href } </script> Code (markup): this will basically redirect the page iframing your site to your site,
Hello! Are you still there? I have a slightly different need. This is where my site is being built: http://www.miramarinteractivo.com.ar/ At the bottom of the page there is a gallery that scrolls on mouse over, where I want to put adds, so far only the fake google ones. I want to replace each one of these adds with an iframe, each with a close button for the individual frame, so visitors can close an add and the next one would slide to fill in the empty space or, at least, reload the whole gallery with its new configuration that excludes the closed frame. I've seen many scripts that create and then close pop ups and iframes with javascript but my frames are not dinamically created: they appear on page load. Other scripts use absolute positioned div elements that are toogled visible or hidden, but apparently these won't allow the frames to be repositioned after an iframe is closed. What I want to do is similar to facebook's suggestion boxes and so far I couldn't find a way to make this work. Any suggestions please?