PDA

View Full Version : Amazon style dropdown always appears



LynnC
10-21-2011, 11:52 PM
1) Script Title: Amazon Style DropDown content box

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/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

vwphillips
10-22-2011, 09:03 AM
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"
}

LynnC
10-28-2011, 05:13 PM
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

LynnC
10-28-2011, 05:22 PM
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