The Blog

SSL fix for IE

I today encountered a problem with Internet Explorer (oh, well, I know). I used ADxMenu on the page that was under SSL. Page loads fine. Then, I hover the menu actuator, which brings up the famous dialog:

This page contains both secure and non secure items.

Do you want to display the non secure items?

There was nothing wrong with the menu, but with WCH script. If you remember, it creates iFrame element on the fly and places it below the menu.

Well, if you don’t have the src specified for the iFrame, IE treats it as unsecure item, hence the dialog. Solution is simple, as usual (once you find out what is the problem):

oHiderContainer.insertAdjacentHTML("afterBegin",
   '<iframe src="/inc/e.html" id=...></iframe>');

Rest of the line stays the same. This e.html is a simple empty file already present in the project. Use anything you want.

Banca

Banca

Beautiful and functional currency converter, supports just about any currency in the world.

Go Couch to 5k

Go Couch to 5k

The most popular starter running program in beautiful feature-rich app (GPS tracking, charts, detailed history etc)

Quickie to do

Quickie to do

The fastest short-term task-list / check-list app on the App Store. Really.

Guerrilla Cardio

Guerrilla Cardio

The most challenging high-impulse interval training in the world.

Run Mate

Run Mate

A versatile running coach app, with unlimited number of running programs. Perfect for casual runners.

8 Comments

Feel free to chime in, looking forward to it. Leave a Comment

  1. Tim Connor says:

    You can use ele.src=‘javascript:false;’;* thus even sparing it having to check for a file, and a request, if caching is set to check every time. At least, I have a similar script doing so, currently, with no problem, tested on 5.5+.

    * Don’t recall for sure that I tested it when creating the element that way, instead of createElement and inserting, but I think I did, and that it worked.

  2. aleck says:

    Tim, thanks for the tip. I tried on the client’s SSL server and it works, without that annoying dialog box.
    I have updated the WCH2 script here.

  3. Ed says:

    Briliant! I knew about the Flash CODEBASE https thing, but this one really had me stumped (not that the IFRAME code was mine, of course…)

    Cheers,

    Ed / Hamburg, Germany

  4. jeremy says:

    How do you go about creating a link in flash to leave out of ssl to an HTTP page. Absolute Url won’t work also (ERROR non secure secure items) Nor a relative url because it will just stay in an ssl state. I would love to know if someone knows?

  5. Indiana Joe says:

    Brilliant! The src=“javascript:false;” thing fixed something that’s been broken on my site for several months! THANK YOU THANK YOU THANK YOU!

  6. Gareth Robinson says:

    Nice one!
    I am working with a different menu (tigra) where I have added the Iframe code myself and was causing me the non-secure problem but htis has fixed it. Cheers!

  7. I used a similar technique when creating the drop-down menus for Crutchfield.com, my employer — I set the source to /null.jpg or something similar, so it would be cached by the browser but would still be within the page’s protocol (http or https).

  8. Well, if you don’t have the src specified for the iFrame, IE treats it as unsecure item”

    Actually, even though the src is not specified, the src still loads the “about:blank” URL scheme.
    This is the real problem, beacause obviously “about:blank” is not over SSL. So provided you insert a URL that is over SSL(or javascript protocol), you will get this error.

Leave a Comment

Add your comment here, just please be civilized and stay on topic.