XML、Flash、JavaScript(DOM系)は、目的のオブジェクトを捕まえるのが大変。
それに比べればやや稚拙な親ウィンドウ操作を少し調べてみた。
やりたいのは、サブウィンドウから、親ウィンドウの一部を書き換えるような処理。
かなり調べてみて、フォームなら可能なようだが、div要素のinnerHTMLとかまでは子ウィンドウからは捕まえられないように見受けられた。
つまり、window.opener.document.div.innerHTML などの記述は誤りみたい。
ってことで、親ウィンドウにhiddenフォームとそれを監視するタイマを用意しておき、子ウィンドウから、そのhiddenフォームを書き換える。
という手法を考えてみた。
→ http://typista.dip.jp/test/get/parent.html
*乱暴なプロトタイプだから、子が親を書き換えているように見えないかも(^^;
◆スマートに実装するために
1.子ウィンドウから親ウィンドウのdiv.innerHTMLの変更方法
これがわかると2.はそもそも不用なんだが・・・
2.特定フォームのonChangeイベントの実装方法
addListernerとか必要?
No comments yet. You should be kind and add one!
By submitting a comment you grant typista a perpetual license to reproduce your words and name/web site in attribution. Inappropriate and irrelevant comments will be removed at an admin’s discretion. Your email is used for verification purposes only, it will never be shared.