IE7でiframeの挙動
IE6とIE7(RC1)でiframe中のtargetの挙動が変わったようだ。
IE7RC1版でのみうまく行かない例
index.html +-- <frame src="a.html" name="a"> +-- <frame src="b.html" name="b"> +-- <iframe src="http://other.example.jp/c.html">
この状態で、http://other.example.jp/c.html 中で
<a href="d.html" target="b">....</a>
としてもフレーム中には表示されず、bという名前の新しいウィンドウで表示しようとする。
回避策
現状の回避策は以下の通り。
index.html +-- <frame src="a.html" name="a"> +-- <frame src="http://other.example.jp/b.html" name="b"> +-- <iframe src="c.html">
このように、フレームのところから別サーバとする。
考察
IE7では、iframeで別サーバへ飛ばしていると、中のhtmlでのtarget指定は別ものと見なしてしまう仕様に変更になったようだ。