Monday, October 8, 2007

IFRAME without src attribute on HTTPS in Internet Explorer

Problem :
This took me quite some time to debug this problem, i think from the images source, but from code also, yess i found this problem solving.

If you have a webpage on a HTTPS server with the following iframe code where you leave the src out:
< iframe id="if">< /iframe>
and you view the page in Internet Explorer you'll get the following very descriptive warning.
This page contains both secure and nonsecure items
Clicking on the More Info button doesn't give you which items it's referring to, but just a help file.

Leaving the src attribute out of the iframe is common, when you want to fill the src attribute programmatically.

Solution :
Create a blank.html page and then write:
< iframe id="if" src="blank.html">< /iframe>
The blank.html only contains < html>< /html >

ps: no need to create blank.html is also work

No comments: