469,917 Members | 1,765 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,917 developers. It's quick & easy.

how do you only allow a popup to popup once

Hi
I use an OnLoad event in the body tag to open a popup window. I would like
to know how to go about only allowing the window to popup once i.e on
subsequent visits to the parent page, the popup np longer pops up. I think
it is irritating to users to have to close the popup everytime they visit
the page. I think I need to set a cookie so that the server knows the
visitor is a return visitor and not a new visitor, but I have no idea how to
write the code. I do know a little php so I could combine php and javascript
if that is the best way to achieve my goal.
thanks
David


Jul 20 '05 #1
4 3483
"David Graham" <da************@ntlworld.com> schrieb im Newsbeitrag
news:s5**************@newsfep1-gui.server.ntli.net...
Hi
I use an OnLoad event in the body tag to open a popup window. I would like
to know how to go about only allowing the window to popup once i.e on
subsequent visits to the parent page, the popup np longer pops up. I think
it is irritating to users to have to close the popup everytime they visit
the page. I think I need to set a cookie so that the server knows the
visitor is a return visitor and not a new visitor, but I have no idea how to write the code. I do know a little php so I could combine php and javascript if that is the best way to achieve my goal.
thanks
David


Set a cookie. Read the cookie. If the cookie exists, donīt show the popup,
else show it.
Jul 20 '05 #2

"Carsten B." <sp*****@web.de> wrote in message
news:3f********@olaf.komtel.net...
"David Graham" <da************@ntlworld.com> schrieb im Newsbeitrag
news:s5**************@newsfep1-gui.server.ntli.net...
Hi
I use an OnLoad event in the body tag to open a popup window. I would like to know how to go about only allowing the window to popup once i.e on
subsequent visits to the parent page, the popup np longer pops up. I think it is irritating to users to have to close the popup everytime they visit the page. I think I need to set a cookie so that the server knows the
visitor is a return visitor and not a new visitor, but I have no idea
how to
write the code. I do know a little php so I could combine php and

javascript
if that is the best way to achieve my goal.
thanks
David


Set a cookie. Read the cookie. If the cookie exists, donīt show the popup,
else show it.

Thanks Carsten - I will read up on this. Can I ask for a few hints as to the
relevant code to carry this out
David
Jul 20 '05 #3
David, Take a look at yahoo and punch in 'Javascript cookies' you should get
a variety of examples on how to create and read them if they exist.

Stuart Palmer

"David Graham" <da************@ntlworld.com> wrote in message
news:TV********************@newsfep2-win.server.ntli.net...

"Carsten B." <sp*****@web.de> wrote in message
news:3f********@olaf.komtel.net...
"David Graham" <da************@ntlworld.com> schrieb im Newsbeitrag
news:s5**************@newsfep1-gui.server.ntli.net...
Hi
I use an OnLoad event in the body tag to open a popup window. I would like to know how to go about only allowing the window to popup once i.e on
subsequent visits to the parent page, the popup np longer pops up. I think it is irritating to users to have to close the popup everytime they visit the page. I think I need to set a cookie so that the server knows the
visitor is a return visitor and not a new visitor, but I have no idea how
to
write the code. I do know a little php so I could combine php and javascript
if that is the best way to achieve my goal.
thanks
David


Set a cookie. Read the cookie. If the cookie exists, donīt show the

popup, else show it.

Thanks Carsten - I will read up on this. Can I ask for a few hints as to

the relevant code to carry this out
David

Jul 20 '05 #4
In article <s5**************@newsfep1-gui.server.ntli.net>,
da************@ntlworld.com enlightened us with...
Hi
I use an OnLoad event in the body tag to open a popup window. I would like
to know how to go about only allowing the window to popup once i.e on
subsequent visits to the parent page, the popup np longer pops up. I think
it is irritating to users to have to close the popup everytime they visit
the page.


Don't worry, most of us have popup killers and don't see it at all.
Unrequested popups are the most irritating thing EVER. So, we just don't
let them pop up at all.
--
~kaeli~
"No matter what happens, somebody will find a way to take
it too seriously."
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by ukrbend | last post: by
2 posts views Thread by =?Utf-8?B?U3VyZXNoIFJlZGR5?= | last post: by
11 posts views Thread by V S Rawat | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.