473,394 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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 3584
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: H00ner | last post by:
Hello All Hope you can help Been pulling my hair out about a popup problem in ASP.NET. One of the forms i wrote requires the user to select a product from a list in a popup web form. the...
7
by: ukrbend | last post by:
I use an iframe on my home page and everything works perfectly. But now I decided to add a popups to my page. The popups come not from within the iframe but from the parent frame. Again, everything...
0
by: mike11d11 | last post by:
I have a tab control on my form that has a webbrowser docked in it. It automatically navigates to a website. Once the users clicks on a particular link and popup window should come up with a...
1
by: skinymike | last post by:
when i allow user to download a media file such as midi or wav files. It automatically open the files using Windows Media Player. Its fine works ok. But when i allow user to download a theme files...
2
by: wreed06 | last post by:
Hello, I have 2 problems. In my webpage, I have a dropdown list with a button that takes the user to a popup window specific to the option. I am using Firefox 2.0.0.13. I have successfully...
5
by: wreed06 | last post by:
I have 2 problems. In my webpage, I have a dropdown list with a button that takes the user to a popup window specific to the option. I am using Firefox 2.0.0.13. I have successfully validated my HTML...
2
by: =?Utf-8?B?U3VyZXNoIFJlZGR5?= | last post by:
I am getting a strange problem with IE7 tabs. The web application I am working (developed in ASP.Net, .Net 2.0), will show a popup message with the count down timer 2 minutes before session time...
11
by: V S Rawat | last post by:
using Javascript, I am opening a web-based url in a popup window. MyWin1=Window.Open(url, "mywindow") There is a form (form1) in the url in that popup window, I need to submit that form. ...
3
by: Bruce | last post by:
I have an application where a main window opens a popup window. Within the popup, I want to be able to post a form back to the popup all the while maintaining the opener property. Of course,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.