Fri, 03/09/2007 - 20:53 — SiteGuy
If you love using Thickbox (http://www.jquery.com/demo/thickbox/) for your modal-box needs and have tried to implement this technology in a secure site you probably have encountered these darn Secure and Nonsecure warnings. More specifically, they state: "This page contains both secure and nonsecure items".
This is happening because there is an iframe being pulled in by JavaScript that does not specify an SRC in the Thickbox code. This is triggering that warning.
To fix this, open up Thickbox.js and edit line 24:
$("body").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>");
Remove the iframe tags from that line, DO NOT add an SRC=# because it will overlay your homepage as the background. You should have:
$("body").append("<div id='TB_overlay'></div><div id='TB_window'></div>");
If you really want to keep the iframe tag in your code because of possible bugs, just add an SRC to a blank page like this:
$("body").append("<iframe id='TB_HideSelect' src='blankpage.html'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>");
This has worked perfectly for me, for photos and content. If you continue to get these messages see these other sites:
Alerts With Flash: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_16588
Alerts With Images: http://www.enginesforwebsites.com/faq/page_secure_nonsecure_items.aspx
Alerts With non-Thickbox Iframes: https://www.sdn.sap.com/irj/sdn/wiki?path=/display/BSP/This+page+contains+both+secure+and+nonsecure+items&