Jump to content

1st time visitor to site to get a pop-up window...


johnmarsella

Recommended Posts

Hello

 

My site uses javascript for a sliding menu (the one I got help with randomizing the other day!) and I want to alert first-time visitors that they should allow their browser to allow the script content.

 

Should I use a pop-up to do this or perhaps have PHP use the if (isset($_COOKIE... thing to determine whether or not to display a little <div> at the top???

<?php
if(isset($_COOKIE['flyingsheep_peanutbutter-chocolate-chip'])){
//render page as is
} else {
$year = 60 * 365 * 24 * 60 + time();
setcookie('flyingsheep_peanutbutter-chocolate-chip', true, $year);
//do something here
}
?>

 

Thanks again y'all!

 

 

 

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.