//flex table opened by JP

Click to See Complete Forum and Search --> : Popup dilemma


CellarDweller
02-28-2003, 01:38 PM
I sure could use some help. My limited knowledge of javascript is showing!

A client of mine uses popups from an advertising company, and the popups appear immediately onLoad. What I've been asked to do is put a few seconds delay on it.

I've tried everything I know but can't get it to work. I even tried having a new browser window open (delayed) with the popup code in it. But all that does is give me a blank new window, and the popup appears in its own window anyway!

I hate popups, and never use them myself, but I'm getting paid to do this, so I need help. Pretty please? :D


Here's the popup code (The URL within it has been changed to protect the guilty.) :

<script language="javascript"><!--
var doc=document; var url=escape(doc.location.href); var date_ob=new Date();
doc.cookie='h2=o; path=/;';var bust=date_ob.getSeconds();
if(doc.cookie.indexOf('e=llo') <= 0 && doc.cookie.indexOf('2=o') > 0){
doc.write('<scr'+'ipt language="javascript" src="http://somewhere.net');
doc.write('/w/pop.cgi?sid=1452&m=2&v=1.7e&u='+url+'&c='+bust+'"></scr'+'ipt>');
date_ob.setTime(date_ob.getTime()+43200000);
doc.cookie='he=llo; path=/; expires='+ date_ob.toGMTString();} // -->
</script>

I tried various onLoad techniques, but nothing seems to work. Anyone have any ideas?

chubtub
02-28-2003, 02:07 PM
Here is all the code that you should need to know.

http://www.richardsonpublications.com/code/javascript.jsp

Hope that helps, just replace the alert in his example with a call to the window pop up.

Plus get rid of the code that updates the text box and the text box. If getting rid of the text box is hard just change its type form 'text' to 'hidden', then they will not see it.:)

This is pure evil, hehe:eek:

CellarDweller
02-28-2003, 03:24 PM
Well, that didn't do the trick. Sorry, but thanks for the suggestion. :)
The result I'm aiming for is to have the popup appear at a later time.

Here's what I'm dealing with:

A file sharing developer I work for uses popup ads in his program, and when you launch the program the ad pops up right away. But this is stopping the launch process for some people. So he wants to have the ad pop up a couple minutes later. Ordinarily this is not a big issue to accomplish, but the available (pre-existing) code from the advertiser is written in such a way that it doesn't work with normal scripts such as you pointed me to. That is, I'm having a problem with it. It's probably something really simple.

All the various onLoad methods and suggestions I've tried from other people haven't worked so far. Is there something other than the norm that I can try? This looks like a special code, probably designed to keep people from doing what I'm trying to do. :D

I appreciate the help... and your patience!