Welcome to WebmasterWorld Guest from 126.96.36.199 , register , free tools , login , search , pro membership , help , library , announcements , recent posts , open posts Pubcon Platinum Sponsor 2014
IE6 quirk: innerHTML w/ any markup breaks Back pcdivenii
I found out in IE6 that when a visitor leaves and then returns to a page that contains an iframe... the last-loaded page within that iframe will load ONLY if the innerHTML of an object is NOT set with HTML tag(s) included. If the innerHTML contains a tag, such as "<b>" or "<someFakeTag>", the first-loaded page within that iframe will (unfortunately for me) load instead. Example:
<div id=nfo> </div>
<iframe name=t2f src="2.html" frameborder=10></iframe>
<a href="3.html" target="_self">3.html</a>
<a href="http://www.cnn.com/" target="_top">CNN</a>
The visitor loads "1.html" ("2.html" is in 1.html's iframe) and then clicks the "3.html" link.
"3.html" sets the innerHTML of 1.html's div to something WITH an HTML tag in it ("<b>").
The visitor cliks the CNN link and goes to CNN.com, then hits the back button. UNFORTUNATELY: 2.html loads within the iframe instead of 3.html (the last-used page).
If we were to get rid of that "<b>" tag in 3.html's innerHTML like:
<a href="http://www.cnn.com/" target="_top">CNN</a> , then 3.html (the last-used page would load... as it should.
I need tags within that innerHTML but I also need the last-used page in the iframe to load when a user navigates back to my page.
This is a problem only in IE6 for me. Firefox navigates just properly when HTML tags are within the innerHTML.
Any ideas to overcome this issue?