Forum Moderators: phranque

Message Too Old, No Replies

Controlling Pop-ups With Cookies?

So visitor will only see pop up once...

         

kindred1

8:44 pm on Jun 1, 2004 (gmt 0)

10+ Year Member



Hello,our site needs to have a popup that the visitors only see once when they visit the site. I cant seem to find many options for cookie based pop up scripts around. I may be wording my searches wrong.

Anyone have any scripts,links,etc to scripts that control Pop-ups With Cookies? thanks a ton!

txbakers

9:09 pm on Jun 1, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi, I do this with my ASP code, but it will work with any language:

It controls the popup if the visitor has already seen it once.

<% if (Request.Cookies("hubvisits") == "" ) {
Response.Cookies("hubvisits") = 1;
} else {
Response.Cookies("hubvisits") = Number(Request.Cookies("hubvisits")) + 1;
}
if (Request.Cookies("hubvisits") == "1") { %>
<script>
var newWindow = window.open('welcome.htm','welcome','width=700, height=450');
newWindow.focus() } </script>

<% } %>

kindred1

3:15 am on Jun 4, 2004 (gmt 0)

10+ Year Member



Thanks alot.

is there any OnLoad event or anything to use this a javascript? anyone else have a code for a offsite pop up with cookies