IE9 iframe src problem with Mixi "like" plugin
I'm trying to insert a Mixi "like" plugin into a site. The Mixi "like" plugin is just an iframe:
<iframe src="http://plugins.mixi.jp/favorite.pl?href=http%3A%2F%2Fexample.com%2Findex.html&service_key=0123456789ABC&show_faces=false" scrolling="no" frameborder="0" allowTransparency="true" style="border:0; overflow:hidden; width:450px;height:80px;"></iframe>
The problem I have is that the ?href argument passed to the src attribute is being interpreted by IE9 Standards Mode as an actual link, so clicking on the iframe causes the browser to navigate to that page (in this example, the browser window navigates to http://example.com/index.html).
Switching IE9 to Compat开发者_如何学运维ibility Mode doesn't seem to have the problem, but from what I understand that's an end-user option.
Is this a common IE9 problem, where the value of an iframe's src is scraped for an href argument and used incorrectly as a link?
This is not a problem with iframes in IE9, it's a problem with Mixi's javascript. Their scripts use an older version of Prototype (1.6) in which they call an event.stop() to stop propagation. The problem is, that stop() call has problems in IE9. So clicking on the link within their iframe doesn't stop iframe from navigating to that page. This is a problem on Mixi's end, and they need to update their javascript in order to fix it.
See: disable a link in IE9 - prototype stop() not working
精彩评论