R – IE6 _top links inside iframe between domains

cross-browseriframeinternet-explorer-6

I have a domain containing an iframe with contents from another domain. Inside this iframe are _top links. On IE6 nothing at all happens when you click them. I have prepared a minimal example of this. Please go to http://www.bemmu.com/static/top.html with IE6 to try it.

Edit: this only seems to happen if security level is "high" (or maybe custom), which it was by default in my IE on fresh install

Source of http://www.bemmu.com/static/top.html:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/DTD/strict.dtd">
<html>
    <body>
        <iframe src="http://bemmu4.appspot.com/static/iframe.html"/>
    </body>
</html>

Source of http://bemmu4.appspot.com/static/iframe.html:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/DTD/strict.dtd">
<html>
    <body>
        <a href="http://www.google.com" target="_top">Let's go to Google!</a>
    </body>
</html>

Is there a way to get these _top links to work?

Best Answer

I don't have ie6 installed in my machine, but I think you can try a little trick in iframe, setting an onclick attribute in your anchor tag with window.top.location.href='http://www.google.com';. Does it work?

Related Topic