another basic question about cgi exit pop up's that rotate

  • maxxer
  • Born
  • Born
  • maxxer
  • Posts: 1
  • Loc: none

Post 3+ Months Ago

I am looking to eliminate some java script pop ups, but I would like to shift them to on exit.

I use the javascript rotator to display different URL's, I can rotate as many as I wish, but I want to change it so it is on exit, or find and exit.cgi application.

here is a copy of the code

<Script Language="JavaScript">
<!--
var how_many_ads = 3;
var now = new Date()
var sec = now.getSeconds()
var ad = sec % how_many_ads;
ad +=1;
if (ad==1) {
url="http://www.example.com1";
}
if (ad==2) {
url="http://www.example2.com";
}
if (ad==3) {
url="http://www.example3.com";
}
rotpop=window.open('','rotpop','toolbar=1,menubar=1,scrollbars=1,status=1,resizable=1,top=1,left=1,width=640,height=480');
rotpop.blur();
rotpop.location=url;
-->
</script>
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

I don't have the answer to your problem, personally, but I just wanted to add my 2 cents. If I was leaving your site and got an onExit pop-up, you just decreased your chances that I would ever visit your site again by at least half. And if you combined that with pop-ups when I arrived, you'd better have something compelling for me to ever want to come back. IMHO pop-up ads are the most annoying things on earth. Over the last couple years they surpassed the most annoying thing on earth -- the common housefly. And I rank the housefly about 50% higher on the ladder.

I wish you good luck, though. I'm sure someone here will be able to tell you how. That's the beauty of this place. We can all enjoy the things we like or dislike together, because we are designer's and everyone is unique.
  • RichB
  • Guru
  • Guru
  • User avatar
  • Posts: 1121
  • Loc: Boston

Post 3+ Months Ago

You could try this. The only drawback (besides obvious dislike/blocking of popups) is that the script will run if the page is refreshed. I don't know any way around that problem.

Code: [ Select ]
<Script Language="JavaScript">
<!--
window.onunload = doPopup;

function doPopup(){
var how_many_ads = 3;
var now = new Date()
var sec = now.getSeconds()
var ad = sec % how_many_ads;
ad +=1;
if (ad==1) {
url="http://www.example.com1";
}
if (ad==2) {
url="http://www.example2.com";
}
if (ad==3) {
url="http://www.example3.com";
}
rotpop=window.open('','rotpop','toolbar=1,menubar=1,scrollbars=1,status
=1,resizable=1,top=1,left=1,width=640,height=480');
rotpop.blur();
rotpop.location=url;
}
--> 
</script>
  1. <Script Language="JavaScript">
  2. <!--
  3. window.onunload = doPopup;
  4. function doPopup(){
  5. var how_many_ads = 3;
  6. var now = new Date()
  7. var sec = now.getSeconds()
  8. var ad = sec % how_many_ads;
  9. ad +=1;
  10. if (ad==1) {
  11. url="http://www.example.com1";
  12. }
  13. if (ad==2) {
  14. url="http://www.example2.com";
  15. }
  16. if (ad==3) {
  17. url="http://www.example3.com";
  18. }
  19. rotpop=window.open('','rotpop','toolbar=1,menubar=1,scrollbars=1,status
  20. =1,resizable=1,top=1,left=1,width=640,height=480');
  21. rotpop.blur();
  22. rotpop.location=url;
  23. }
  24. --> 
  25. </script>
  • sakib000
  • Newbie
  • Newbie
  • sakib000
  • Posts: 6

Post 3+ Months Ago

how can i rotate ads on my site http://www.photosharingworld.com

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 83 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.