开发者

How do I dynamically modify content (a TreeView) in the parent page from a child IFrame?

开发者 https://www.devze.com 2022-12-19 07:07 出处:网络
I have a TreeView menu on a parent or base base that hosts an IFrame in which content pages corresponding to menu items are loaded. Ideally one of my content pages should dymamically insert its own co

I have a TreeView menu on a parent or base base that hosts an IFrame in which content pages corresponding to menu items are loaded. Ideally one of my content pages should dymamically insert its own contextual items into it's section of the TreeView menu.

I have a strong suspicion that jQuery is pretty much the only tool I am familair with that I will be able to use here, but any suggestions as to where to start with this quest will be most appreciate开发者_如何学God.


As long as the iFrame content and the parent are not cross-domain, you should be able to access the parent window's DOM with something like:

window.opener.document.getElementById('mytreeview');
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号