Only Popup Once 2 | JavaScriptSource

Only Popup Once 2

JavaScriptSource Staff Sep 3, 1999

General

If you have a popup window which opens on your home page every time a visitor returns, it can become very annoying. Using cookies, this script can determine if the visitor has been here before, and only open a new window on their first visit to the page. The next time they come back, the script will read the cookie, identify them as a repeat visitor, and not open the window again.


[ Reload the page and you'll notice that the popup window doesn't open again. ]

Notes

  • Posted: September 03, 1999

Source Code

Paste this source code into the designated areas.

External file

Paste this code into an external JavaScript file named: onlyPopupOnce.js


Head

Paste this code into the HEAD section of your HTML document.


Leave a Response

(8 comments)

Great[br /][br /]It´s a perfect solution cookie for popups.[br /][br /]Thanks a lot[br /][br /]Rosana

Rosana Dec 13, 2007

Hey Zack,[br /][br /]You can copy and paste the code into Notepad and save as onlyPopupOnce.js. Make sure you add the .js as the exstension.[br /][br /]Then you can upload the file to you site. Can you upload external files with Homestead?[br /][br /]Hope this helps.[br /][br /]David

David Dec 5, 2007

Due to the limitations of these comments, you will need to submit your question to the [a href="http://www.webdeveloper.com/forum/forumdisplay.php?f=3"]JavaScript Forum[/a] for further help.

Lee Dec 4, 2007

Ok, I will sound VERY stupid, but how do I make an external JavaScript file? I have a website provider called Homestead, so I don't normaly use javascript or HTML, It is a drag and drop software. They do let me have a HTML element. Does anyone out there use homestead and know what to do?

Zack Nov 21, 2007

That really has nothing to do with this script, Gene. You will need to submit your question to the [a href="http://www.webdeveloper.com/forum/forumdisplay.php?f=3"]JavaScript Forum[/a] for further help.

Lee Nov 13, 2007