Forum: Ruby on Rails secure and unsecure items

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Bas van Westing (Guest)
on 2007-05-26 13:33
Hi,

I host a secure ruby on rails appplication over https (at textdrive).
All worked fine, untill I started using the javascript library 'lowpro'
with some additional script which does adjusts some layout when I resize
the browser through window.onload & window.onresize events.

Now I get a "this page contains both secure and unsecure items" popup in
IE6 for every page.

I've always used relative paths, and I am using relative paths now also.
I used javascript libraries 'effects', 'dragdrop' & 'controls' before
and I also use several AJAX requests. I never got this popup before.

Does anyone have a clue why I have this problem now?

Thanks,
Bas
Mohit S. (Guest)
on 2007-05-26 16:02
(Received via mailing list)
Bas van Westing wrote:
> I've always used relative paths, and I am using relative paths now also.
> I used javascript libraries 'effects', 'dragdrop' & 'controls' before
> and I also use several AJAX requests. I never got this popup before.
>
> Does anyone have a clue why I have this problem now?
>
> Thanks,
> Bas
>
>
Any chance that your Javascript file is not being served from the https
site?

Cheers
mohit.
Bas van Westing (Guest)
on 2007-05-26 16:15
Mohit S. wrote:
> Any chance that your Javascript file is not being served from the https
> site?

Thanks for your response, but that was not the problem. Bit I did find
the reason however:

I use the lowpro.js library which defines the 'Event.addBehaviour'
method.
The popup was triggered by this piece of javascript (which is served
over https):

-----------START CODE----------------------------
Event.addBehavior({
  '#content' : function() {
    MyFunctions.resize_content()
  },

  'body' : function () {
      $(document.body).setStyle( {
          overflow: 'hidden'
      } );
  }

});
-----------END CODE------------------------------

I now worked aroud this code with the following setup:

-----------START CODE----------------------------
var MyFunctions = {

    //....

    init_on_load: function() {
       MyFunctions.hide_body_overflow()
       MyFunctions.resize_content()
    }

};
window.onload = MyFunctions.init_on_load
-----------END CODE------------------------------

Not the IE6 popup is gone.

Regards,
Bas
Bas van Westing (Guest)
on 2007-05-26 16:16
Bas van Westing wrote:
> I now worked aroud this code with the following setup:
I now worked around this code with the following setup:

> Not the IE6 popup is gone.
Now the IE6 popup is gone.
Mohit S. (Guest)
on 2007-05-26 16:30
(Received via mailing list)
Bas van Westing wrote:
>
>
Great!

Cheers
Mohit
This topic is locked and can not be replied to.