PDA

View Full Version : Drop-In inline box showing in https



ProgramSupportHub
06-13-2013, 02:03 PM
1) Script Title: Drop-in content box v2.0

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/dropinbox.htm

3) Describe problem: In the past I had an issue with the drop-in box showing once per http session on my site and then showing again when the server switched to secure (https). At the time I believe I was using an external file for the drop-in content. This issue was corrected with the following code


<script>
if(location.protocol.indexOf('https') < 0){
} </script>

My site uses snippets that can be edited without recompiling all the templates when something is changed. For some reason I cannot get the snippet to load with an external file AND a delay on the box droping, so I'm now using an inline DIV to load the drop-in box information when the page loads and all works fine. That is until the server goes to https. Once the secure server loads the page the inline div is now visible in the footer, which is where I've placed it.

I tried wrapping that same piece of code I showed above around the inline DIV but it still doen't solve the problem.

Any suggestions?
Here is the site
http:toolnook.com

jscheuer1
06-13-2013, 03:47 PM
if(location.protocol.indexOf('https') < 0){
var dropinbox2=new dropincontentbox({
source:'#reminder', //#id of DIV to show if defined inline
cssclass:'dropinbox dropinboxaltstyle drop-shadow lifted',
fx:'easeInExpo', //alternate drop animation keyword
pos:['center',-250], //custom position of drop in box
deferred:3, //show box 1 sec after page has loaded
freq:'session'
})
} else {
jQuery('head').append('<style>#reminder{display: none !important;}</style>');
}

ProgramSupportHub
06-13-2013, 04:21 PM
Thank you,
As always you have helped me. Maybe one day I can return the favor with something.