Forum Moderators: open
First at all Iam newbie on programing stuff.
This script below must works after user leave the web site must appear pop-up window, if cookie (let say:livecare) exist in local user PC then pop up doesn't appear.
So script won't work correctly, where is it wrong.
U can paste here some of your similar script.
<Note: line breaks added to window "features" string - Tedster>
<SCRIPT LANGUAGE="JavaScript">
cookie_name = getCookie("livecare")
function getCookie (Name) {
var search = Name + "="
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset!= -1) {
offset += search.length
end = document.cookie.indexOf(";", offset)
if (end == -1)
end = document.cookie.length
return unescape(document.cookie.substring(offset, end))
}
}
}
var exit=true;
mystring = "pop";
function leave(){
if (cookie_name == mystring)
{
}
else {
if (exit)open('win-get_access/index.php','MyWindow',
'toolbar=no,location=no,directories=no,status=no,menubar=no,
scrollbars=no,resizable=no,width=450,height=550,left=1,top=1');
}
}
</script>
[edited by: tedster at 5:15 am (utc) on Feb. 27, 2003]