<div id='ad' style='position:absolute; left : 174px; top : 14px; width : 597px; height : 740px;'>
<div style="opacity: 1.0;"> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- 500-400 -->
<ins class="adsbygoogle"
     style="display:inline-block;width:500px;height:300px"
     data-ad-client="ca-pub-********"
     data-ad-slot="*****"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script> </div>
</div>
<script type='text/javascript'><!--
window.onscroll = function () { //hope this works, havent tested it
document.getElementById ('ad').style.top = (200 + document.body.scrollTop) + 'px';
}
--></script>

Recommended Answers

All 7 Replies

like that no like the script Capture.PNG

Martin, you can view source to see how a web site does something. I looked at that link and did not get a pop up window or such. So my advice is to read the source of that site to see what they did.

ok thnx you

I wish you could reveal what it is we want to close. I tried your script with a fiddle (online edit and test) but it went nowhere. Since we can't close a window, then it must be something else that is popping up. Once we know what that is, then we can go over its controls.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.