mancar487
Elite Member
- Apr 12, 2012
- 2,218
- 2,817
Hello,
I'm posting a question that may also be of use to others.
Basically I want to add a 'magic buy button' (timed button - it appears after a specific time interval) to my website. I have found the code to add the button, however, my problem is: I want this button to appear right from the start to returning visitors. How do I do this?
I have found this piece of code, but I do not know how to implement it for the magic button:
P.s the code I am using for the magic button is:
in header:
before the magic button:
I'm posting a question that may also be of use to others.
Basically I want to add a 'magic buy button' (timed button - it appears after a specific time interval) to my website. I have found the code to add the button, however, my problem is: I want this button to appear right from the start to returning visitors. How do I do this?
I have found this piece of code, but I do not know how to implement it for the magic button:
Code:
setcookie("FirstVisit", '1');
Code:
function DisplayWelcomeMessage()
{
if (isset($_COOKIE['FirstVisit']) && $_COOKIE['FirstVisit'] == 1)
{
// Display a welcome message
// Update the cookie so that they don't get this message again
setCookie("FirstVisit", "0");
}
else
{
// Do something different for people who have visited before
}
}
P.s the code I am using for the magic button is:
in header:
Code:
<script type="text/javascript">
$secondsdelay = 90;
function unhide(divID) {
var item = document.getElementById(divID);
if (item) {
item.className=(item.className=='hidden')?'unhidde n':'hidden';
}
}
$delay = $secondsdelay*1000;
window.setTimeout("unhide('links')",$delay);
//--></script>
<STYLE TYPE="text/css">
.hidden { visibility: hidden; }
.unhidden { visibility: visible; }
</STYLE>
before the magic button:
Code:
<div id="links" class="hidden">