473,394 Members | 2,002 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.

Show GreyBox Pop Up Only Once?

Hi Everyone,

I'm new to this, so bear with me...

I need a cookie that will make the pop up that displays (wait 10
seconds) only pop up once
per user. How can I do that with a cookie? PLEASE HELP

Here's the site: http://www.saveourbones.com/

Thanks in advance! You guys rock!
Jun 27 '08 #1
3 3095
On May 27, 11:28 am, sixstringsk <thekleincollect...@yahoo.comwrote:
Hi Everyone,

I'm new to this, so bear with me...

I need a cookie that will make the pop up that displays (wait 10
seconds) only pop up once
per user. How can I do that with a cookie? PLEASE HELP

Here's the site:http://www.saveourbones.com/

Thanks in advance! You guys rock!
What did you try? What error messages did you see?

<URL: http://jibbering.com/faq/#FAQ3_1>

<URL: http://www.google.com/search?q=javascript+cookies>

Peter
Jun 27 '08 #2
On May 27, 5:15*pm, Peter Michaux <petermich...@gmail.comwrote:
On May 27, 11:28 am, sixstringsk <thekleincollect...@yahoo.comwrote:
Hi Everyone,
I'm new to this, so bear with me...
I need a cookie that will make the pop up that displays (wait 10
seconds) only pop up once
per user. *How can I do that with a cookie? *PLEASE HELP
Here's the site:http://www.saveourbones.com/
Thanks in advance! *You guys rock!

What did you try? What error messages did you see?

<URL:http://jibbering.com/faq/#FAQ3_1>

<URL:http://www.google.com/search?q=javascript+cookies>

Peter
Hi Peter,

Thanks for your reply—I actually don't know where to start, so I
didn't try anything. The pop up window is on a 10 second delay and is
called using the "onload="Func1Delay()"" function. Does that help?

I would be happy to pay someone via PayPal if they can give me the
code to add, so that the pop only shows once per visitor.

Thanks!
Jun 27 '08 #3
On May 27, 3:32 pm, sixstringsk <thekleincollect...@yahoo.comwrote:
On May 27, 5:15 pm, Peter Michaux <petermich...@gmail.comwrote:
On May 27, 11:28 am, sixstringsk <thekleincollect...@yahoo.comwrote:
Hi Everyone,
I'm new to this, so bear with me...
I need a cookie that will make the pop up that displays (wait 10
seconds) only pop up once
per user. How can I do that with a cookie? PLEASE HELP
Here's the site:http://www.saveourbones.com/
[snip]
The pop up window is on a 10 second delay and is
called using the "onload="Func1Delay()"" function. Does that help?

I would be happy to pay someone via PayPal if they can give me the
code to add, so that the pop only shows once per visitor.
Usually code requests on comp.lang.javascript are ignored as someone
wants a free lunch. You say you are willing to pay so this is a test
of human honesty.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

<html>
<head>
<title>cookie test</title>

<script type="text/javascript">
// the already existing code
function Func1Delay() {
window.open('http://groups.google.com/group/
comp.lang.javascript')
}
</script>

<script type="text/javascript">
// the new code
function onlyOnce() {
if (document.cookie.indexOf("hasSeen=true") == -1) {
var later = new Date();
later.setFullYear(later.getFullYear()+10);
document.cookie = "hasSeen=true;expires="+later.toGMTString();
// call the old function
Func1Delay();
}
}
</script>

</head>
<body onload="onlyOnce()">

<p>the page</p>

</body>
</html>
---------

Paypal is actually having some problems right now. Please send me an
email and we can discuss payment.

Peter
Jun 27 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: MOHSEN KASHANI | last post by:
Hi, I am trying to hide some form elements in a form by default and show/hide depending on which radio button is clicked. This is what I have but it is not working: <head> <style> ..noshow {...
4
by: kdubble | last post by:
Hi I am trying to get the results of a query to show only unique student records (not duplicates). Is there a simple way to make the criteria field do this? I am not too familiar with SQL. ...
0
by: Dunc | last post by:
Has anyone successfully managed to get the Altas Toolbox AutoCompleteExtender working inside a GreyBox control? While I've got the code and code-behind working fine, the "dropdown" panel is...
39
by: alex | last post by:
I've converted a latin1 database I have to utf8. The process has been: # mysqldump -u root -p --default-character-set=latin1 -c --insert-ignore --skip-set-charset mydb mydb.sql # iconv -f...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.