iframe呼出し後に、親ページでa nameを飛ばす方法

●親ページ
iframeの下にa nameを指定
●子ページ
iframeでdocument.writeでhtml出力。
chromeは何もしなくても動く。
IEとFirefoxがNGになる。
onload完了判定→Mozilla系はいけるがIEはNG。
onreadystatechageイベントは読み込み状態を示すreadyStateが変化した時にすれば、
IEでも判定できるとのこと。
http://blog.goo.ne.jp/xmldtp/e/14eb745426bd8f3fde7b4f41245bfc2e
http://wiki.bit-hive.com/tomizoo/pg/JavaScript%20%A5%A4%A5%F3%A5%E9%A5%A4%A5%F3%A5%D5%A5%EC%A1%BC%A5%E0%28iframe%29%B4%D8%CF%A2
→判定はうまくいくが、
 iframeの高さを指定しない状態(可変)
 では、iframeの高さが後で確定するため、うまくいかず。
iframeの高さを自動調節してくれるJavaScriptライブラリ
http://www.facebook.com/genet.jp/posts/262653740477788
http://css-eblog.com/javascript/fit-height-iframe.html
iframeの非同期処理
http://www.insidenet.co.jp/index.php?option=com_content&view=article&id=119:iframe&catid=92:rev-ref&Itemid=159
Jqueryでiframe
http://d.hatena.ne.jp/cyokodog/20090616/iframe01
[jQuery]ページを読み込み終わってから処理を行う
http://msbizit.blog28.fc2.com/blog-entry-88.html
javascriptでjump
http://phpjavascriptroom.com/?t=js&p=location2
a nameの座標取得
http://www.sencha.com/forum/archive/index.php/t-151559.html?s=19af7d1d5cb70abb4af00ae968ef3e5c
div idの座標取得
http://www.24w.jp/study_contents.php?bid=ajax&iid=prototypejs&sid=element&cid=004
●結論
iframeの高さを自動調節してくれるJavaScriptライブラリ
http://css-eblog.com/javascript/fit-height-iframe.html

[jQuery]ページを読み込み終わってから処理を行う
http://msbizit.blog28.fc2.com/blog-entry-88.html
var frm = document.getElementById('frame01');
$(frm).load(function(){処理});
で、IE、Firefoxは動くので、chromeのみ除外すればいける。

タイトルとURLをコピーしました