I’m using the slider in a website that is served through HTTPS and Internet Explorer throws the following message when the page is loaded:
“Do you want to view only the webpage content that was delivered securely?”
Removing the slider sorts the issue out. I’ve been going through the JS code, specially in dhtmlxcommon.js and I managed to remove all calls to XMLHttpRequest and to the ActiveX objects, which were likely to cause this issue, but I’m still with no luck.
This is a simplified version of the page (please bear in mind that I’ve added all JS directly to the page here but everything is actually in separate JS files):
<html>
<head>
<link rel="STYLESHEET" type="text/css" href="Scripts/dhtmlxSlider/codebase/dhtmlxslider.css" />
<script type="text/javascript" src="Scripts/jquery-1.8.0.min.js"></script>
</head>
<body>
<script type="text/javascript">
window.dhx_globalImgPath = "Scripts/dhtmlxSlider/codebase/imgs/";
</script>
<script type="text/javascript" src="Scripts/dhtmlxSlider/codebase/dhtmlxcommon.js"></script>
<script type="text/javascript" src="Scripts/dhtmlxSlider/codebase/dhtmlxslider.js"></script>
<script type="text/javascript" src="Scripts/dhtmlxSlider/codebase/ext/dhtmlxslider_start.js"></script>
<div id="pcSlider"></div>
<script type="text/javascript">
function SliderValueChanged(pos, slider) {
// doing some calculations here based on the position of the slider.
}
var slider = new dhtmlxSlider("pcSlider", 735, null, null, 0, maxChargeRatio, 0, 0.01);
slider.attachEvent("onChange", SliderValueChanged);
slider.init();
slider.setValue(0);
</script>
</body>
</html>
This simple page, served under HTTPS, gives me that error on IE (and IE only, I’ve tested Chrome, Safari and Firefox and they don’t have a problem with it).
It works in IE, but if the page is served through a certificate with SSL and HTTPS, a security warning is displayed (at least with IE 8). I would like to get rid of that warning… Did you try it over HTTPS?
Yes, it does occur with the code sent by Darya, I’m afraid to say.
I will try to provide you with a live page so you can see it, I’ll post again tomorrow.
The problem wasn’t really happening with the code Darya had sent, it was happening to me because I had always added code to set the skin in there before trying it. I finally tried without the skin and that worked.
So the problem was that the image for the skin I was using wasn’t being loaded with HTTPS, because of the line window.dhx_globalImgPath = “dhtmlxSlider/codebase/imgs/”;