Results 1 to 4 of 4

Thread: Amazon style dropdown always appears

  1. #1
    Join Date
    Oct 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Amazon style dropdown always appears

    1) Script Title: Amazon Style DropDown content box

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...amazondrop.htm

    3) Describe problem: We've been running this script for over year on two different sites. We had initially set it to appear "oncepersession", but we getting lots of complaints that it appeared on every page. We advised folks to allow cookies, but that didn't help much.
    www.berroco.com
    www.caron.com

    So we set it to appear at an interval of "5", which should serve the box every 5th page. But we still get complaints that it appears on every page.

    Has there been an upgrade to the script, or is there some code I can add to it to prevent it from serving so frequently?

    BTW, on my browsers, it is serving properly.

    If there hasn't been a fix to this code, can someone suggest something that is more reliable?

    Thx, Lynn

  2. #2
    Join Date
    Dec 2008
    Location
    Portsmouth, UK
    Posts
    1,891
    Thanks
    2
    Thanked 441 Times in 435 Posts

    Default

    Code:
    if ((displaymode=="oncepersession" && get_cookie("droppedinv2")!="yes") || displaymode=="always" ||( typeof(displaymode)=='number' && Math.floor(Math.random()*displaymode)==0)){
    if (window.addEventListener)
    window.addEventListener("load", initboxv2, false)
    else if (window.attachEvent)
    window.attachEvent("onload", initboxv2)
    else if (document.getElementById || document.all)
    window.onload=initboxv2
    if (displaymode=="oncepersession")
    document.cookie="droppedinv2=yes"
    }
    Last edited by vwphillips; 10-22-2011 at 09:09 AM.
    Vic
    God Loves You and will never love you less.
    http://www.vicsjavascripts.org/Home.htm
    If my post has been useful please donate to http://www.operationsmile.org.uk/

  3. #3
    Join Date
    Oct 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    So do I add all of what is in red to the existing code? Even the double == and the double &&?
    That will make it show only once per session?
    We are set at "5" to appear on every 5th refresh.
    Is this fix only for "oncepersession"?

    Thanks for the help. Much appreciated.
    Lynn

  4. #4
    Join Date
    Oct 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Okay, I get it about the double == and &&.
    (Should have looked at my own code first.)

    But why should this suddenly have stopped working?

    And is this fix just for oncepersession?

    Thanks,

    Not A Coder

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
  •