I have a site that is being used for humor only and I was wondering if there was a way to make a certain page load into a window that would pop up a certain # of times?
@Beach_BumDec 21.2002 — #could you be more specific.
do you want the page to keep poping up when the person closes the current page? try the onunload event (goes in the body statement).
do you want to have a new window just pop up a bunch of times while they are looking at a page? try using seTimeout to rerun the function after a second or two with a counter to stop it after a certain number of times.
or do you want something else?
we can give you more specific coding advice if you narrow down what you are after.
@Beach_BumDec 21.2002 — #I fail to find any humor in pop-up windows.[/QUOTE] i would agree with you - but the humor i find in pop-up windows is that "they" assume we see them (i use pop-up stopper).
When the page loads, I want a window to pop up. I want this window to pop up x times and I would like this window to keep popping up if they leave this site.
As for the humor part, it is a site making fun of the stupidity of pop ups!
@Beach_BumDec 21.2002 — #then you may want to use onload="popIt()" in your body statement. Where popIt is a javascript function that uses window.open to pop up a window. in window.open you can specify the size you want. then you could use a loop/counter in the function to execute the window.open how ever many times you want.
reread what you said - you want it to keep poping even after they leave the site. then forget the loop/counter.
in the new window you open with window.open you would need to put another onload with another window.open - that way as each window loads it loads another. until it opens a window without another window.open