关于magento的fancybox混合内容问题

我在顶部使用fancybox登录/注册链接。 该网站完全是http,当然客户希望启用ssl并启用该https。 所以这里的fancybox最终出现了问题。

这是标题链接的phtml代码。

  • Hi Guest, <a class="lightbox-start" href="https://stackoverflow.com/questions/4859735/fancybox-mixed-content-problem-on-magento/">Sign in or <a class="lightbox-start" href="https://stackoverflow.com/questions/4859735/fancybox-mixed-content-problem-on-magento/false));?>customer/account/create/">Register
  • 当我点击没有响应时,经过长时间的调试我发现/猜测它是一个混合内容问题。 因为我在不安全的页面中加载安全的页面内容。

    如何使用magento中的fancybox在http页面上加载https内容。

    请帮帮我。

    提前致谢。

    看起来你需要从//而不是http(s)://开始你的URL,因为它会为你自动完成所有这些操作。 将firebug放在页面上,看看什么是http而不是https,在你的代码中找到它并把//放在前面。

    更重要的是,为什么你使用fancybox而不是在普通的javascript +原型中做自己的模态窗口?

    通过在fancybox上使用iframe类型,我在fancybox中通过http加载了https页面。

      jquery("a.lightbox-popup-start,a.lightbox-start").fancybox({ 'transitionIn' : 'elastic', 'transitionOut' : 'elastic', 'speedIn' : 800, 'speedOut' : 400, 'width' : 740, 'height' : 430, 'type' : 'iframe', 'overlayShow' : true }); 

    但是你们再次猜测IE8会显示内容被拒绝,因为它会在iframe上加载安全内容。

    此外,我试图使用这两个选项来关闭fancybox。 但它不起作用。 Anybosy猜测为什么它不起作用。

     top.w49.fancybox.close(); parent.w49.fancybox.close(); 

    提前致谢,