Jump to content

Need help setting a cookie so the alert box only displays ONCE


Mike Smith

Recommended Posts

Hi everyone,

 

I am working with the "sexy alert box" found here and have the code below, which pops up the sexy alert box on every page load.

 

<script type="text/javascript">
function test() {
Sexy.alert('Hello world!');
}
window.onload=test;
</script>

 

My problem is that I only want that code to show on the FIRST load for the user and every page after that it should not be showing. This will be the first time I've worked with cookies so I am a bit confused as to what to do with this code and where to edit things.

 

Any help I receive is greatly appreciated :)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.