You will recieve your password to this address. Address is not made public.

Your preferred username that is used when logging in.

Is it possible to only show the overlay once? Created Sep 1, 2010

This thread is solved

Views: 1895     Replies: 5     Last reply Aug 2, 2011  
You must login first before you can use this feature

sketchgal

Posts: 3

Registered:
Sep 1, 2010

Is it possible to only show the overlay once?

Posted: Sep 1, 2010

This is the first time I've used any of the amazing scripts on this site! They're great! I have a question about the overlay one. I have it set up so that once the page has loaded it show the overlay. I'm intending to put a short form in the overlay to collect users email address's. What I was wanting to do was if the user has already either filled in the form or closed the form and the page is reloaded that the overlay does not show for a second time.

Can anyone tell me if this is possible and how I would go about setting this up please.

Any help much appreciated.

Thanks in advance.

p3drosola

Posts: 3

Registered:
Sep 3, 2010

Use Cookies

Posted: Sep 3, 2010

Reply to: Is it possible to only show the overlay once?, from sketchgal
The easiest way will probably be to use cookies in javascript.

the logic flow would be


- check for cookie
- if (cookies dies not exist)
  - make overlay
  - set cookie

That way next time the page loads on that user's machine it will not open the overlay.

sketchgal

Posts: 3

Registered:
Sep 1, 2010

» Use Cookies

Posted: Sep 6, 2010

Reply to: Use Cookies, from p3drosola
Thanks for the help with this I'll have a go at it, might need to come back if I run into any issues!

Appreciate the help.

shaitiger

Posts: 5

Registered:
Mar 11, 2010

» Use Cookies

Posted: Sep 24, 2010

Reply to: Use Cookies, from p3drosola
So how would that logic be coded then with this overlay? Thx

Sachin Parmar
A designer without a pen is a person without an idea!

Posts: 1

Registered:
Jun 1, 2011

re: Using cookies with ovelay

Posted: Jun 1, 2011

Reply to: Use Cookies, from p3drosola
I am trying to get my overlay working with cookies. I have looked all over the internet and nothing seems to work.

I got the overlay working on this site but need it to store cookie information so if a user arrives to the page again they won't see the pop up.

This is my code:
<script>
$(document).ready(function() {
//Code to fire popup
$("#popup").overlay({

// custom top position
top: 260,

// some mask tweaks suitable for facebox-looking dialogs
mask: {

// you might also consider a "transparent" color for the mask
color: '#000',

// load mask a little faster
loadSpeed: 200,

// very transparent
opacity: 0.75
},

// disable this for modal dialog-type of overlays
closeOnClick: false,

// load it immediately after the construction
load: true

});
});
</script>

I tried this but it didn't work:

<script>
$(document).ready(function() {
$.cookie("#popup", "false", { expires: 255 }.overlay);
if($.cookie("#popup")){
//Code To not show popup
load: false
}else{
//Code to fire popup
$("#popup").overlay({

// custom top position
top: 260,

// some mask tweaks suitable for facebox-looking dialogs
mask: {

// you might also consider a "transparent" color for the mask
color: '#000',

// load mask a little faster
loadSpeed: 200,

// very transparent
opacity: 0.75
},

// disable this for modal dialog-type of overlays
closeOnClick: false,

// load it immediately after the construction
load: true

});
}
});
</script>

Please help!!!

0ad

Posts: 1

Registered:
Jan 10, 2010

» re: Using cookies with ovelay

Posted: Aug 2, 2011

Reply to: re: Using cookies with ovelay, from smilez
**Bump**

I'd like the code to run once too! =) TIA!