Forum: Rails Spinoffs (closed, excessive spam) Prototype SSL Error

Posted by Richard Cook (Guest)
on 2008-06-27 18:20
(Received via mailing list)
When I am running a page that includes prototype (v 1.6.0) and is
using SSL, I get a "This page contains both secure and nonsecure
items. Do you want to display the nonsecure items?" I only get this
error in IE (v 7.0.5730.11) and not in FireFox. When I comment out the
prototype include, then the question goes away. I am not using any
iframes on the page and myself plus two other developers have checked
to make sure that there aren't any nonsecure images and such on the
page.

Thus my comment above that when I comment out the prototype include, I
don't get the warning.  I have also done a view source on the rendered
page from both IE and Firefox and copied those pages into source safe
and did a dif on the file and except for whitespace, they are exactly
the same.

Any suggestions would be appreciated since we are using it throughout
the development project and we are on a really tight deadline so
ripping it out may not be an option.
Posted by Gareth Evans (Guest)
on 2008-06-29 07:57
(Received via mailing list)
At a guess, it's the dom content loaded workaround, located at line 4025 
of
1.6.0.2

  document.write("<script id=__onDOMContentLoaded defer
src=//:><\/script>");
    $("__onDOMContentLoaded").onreadystatechange = function() {
      if (this.readyState == "complete") {
        this.onreadystatechange = null;
        fireContentLoadedEvent();
      }

This code is executed if document.addEventListener isn't defined, which
under IE, isn't.

If you're not using dom:loaded, i'd just comment this block out as a 
quick
fix and find out from the core guys the proper workaround.
If you are using dom:loaded, you *could* change to window.onload
(Event.observe(window,load,...);) and then comment the code.

Gareth Evans
Sniper Systems
On Sat, Jun 28, 2008 at 4:19 AM, Richard Cook <cookrichard@hotmail.com>
Posted by Richard Cook (Guest)
on 2008-06-30 18:53
(Received via mailing list)
Gareth,

  Thanks alot!  That did the trick.  I really appreciate the help.

Richard
This topic is locked and can not be replied to.