SitePoint Sponsor

User Tag List

Results 1 to 1 of 1

Threaded View

  1. #1
    SitePoint Member
    Join Date
    May 2011
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Arrow Load script only for returning USER!!!

    I need a script which will load another script only for returning user!

    The script which will need to load this script:
    PHP Code:
    <a href="http://www.w3.org/" >W3C</a
    I have a script which loads a popup only for new customers:

    PHP Code:
    <SCRIPT LANGUAGE="JavaScript">
    <!-- 
    Script courtesy of http://www.web-source.net - Your Guide to Professional Web Site Design and Development
    function GetCookie(name) {
    var 
    arg=name+"=";
    var 
    alen=arg.length;
    var 
    clen=document.cookie.length;
    var 
    i=0;
    while (
    i<clen) {
    var 
    j=i+alen;
    if (
    document.cookie.substring(i,j)==arg)
    return 
    "here";
    i=document.cookie.indexOf(" ",i)+1;
    if (
    i==0) break;
    }
    return 
    null;
    }
    var 
    visit=GetCookie("COOKIE1");
    if (
    visit==null){
    var 
    expire=new Date();
    window.name "thiswin";
    newwin=open("yourpagename.html""dispwin"
    "width=450,height=455,scrollbars=yes,menubar=no");
    expire=new Date(expire.getTime()+7776000000);
    document.cookie="COOKIE1=here; expires="+expire;
    }
    // -->
    </SCRIPT> 

    thanks

    edit:

    Yet I need the script only to load once for the returning customers every 1 day

    thanks again
    Last edited by chrisvw; May 25, 2011 at 03:35. Reason: forgot something


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
  •