View Full Version : How can I create a Popup which only starts the first time you visit my site?

01-17-2003, 09:33 AM
Dear Pro's

I've got a new address and want the visitors of my site to get a popup in which I bring them this news. I know how to create a popup, but I don't want a popup the second time they visit my site. I know this has something to do with cookies, but I have never worked with cookies before. Is there a script for this?

Greetings JavaRookie

01-17-2003, 02:39 PM
try this:

function onePop() {
cook = unescape(document.cookie);
cook = cook.indexOf("=");
if(cook.length != 0 && cook[1]!=1) {
//popup code

01-17-2003, 04:00 PM
Check out this script in the Free Scripts section:

It uses onUnLoad in the body tag to popup a window, but you could change that to onLoad.