Welcome to EMC Consulting Blogs Sign in | Join | Help

Michael Ciba's Blog

ThickBox, IE6 and a little secure and nonsecure item problem

So it’s been a fun packed morning looking at an issue within ie6 that was causing the “This page contains both secure and nonsecure items” prompt to be displayed then viewing a page over HTTPS.

The problem itself only reared its ugly head when the page tried to open a UI dialog to the user using the “ThickBox” add-on to jquery. So after a bit of digging around I found out that IE6 shows this message because “ThickBox” is adding an iframe to the page without the src attribute set. In order to fix the issue then all you need to do is add a dummy src attribute to the iframe when it is appended to the page by “ThickBox”. See the example below.  The bit of code you need to update can be found on line 38 within the thickbox.js file.

Original Code

 $("body").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>");

Updated Code

$("body").append("<iframe id='TB_HideSelect' src='java script:false;'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>");

 

 

Published 05 November 2008 14:32 by Michael.Ciba

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

Dan said:

Nice find, got rid of that annoying prompt!

I was having another issue in IE6/7 where elements on my page where disappearing and/or getting re-sized awkwardly.  Thickbox may change overflow properties of elements so I fixed the problem by making sure every element on the page had properly set dimensions.  I was pulling my hair out over that one for a little while.

August 20, 2009 20:18
 

David L Gorman said:

Thank you sir!  That did the Trick

September 30, 2009 03:58
 

Bala said:

Thanks so much! I have been tried coupls of days to figure out issue in https.

It worked.

June 2, 2010 21:19

Leave a Comment

(required) 
(optional)
(required) 
Submit
Powered by Community Server (Personal Edition), by Telligent Systems