SitePoint Sponsor

User Tag List

Results 1 to 1 of 1
  1. #1
    SitePoint Member
    Join Date
    Oct 2002
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Angry Pop-up window, cookie problem

    Hello guys

    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 the hell is wrong.
    U can paste here some of your similar script.

    <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>

    Last edited by Trusty; Feb 26, 2003 at 15:27.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •