开发者

JS to keep active state of menu in relation to iFrame content

I know that to get a link to display current page state using CSS I would have to create new pages, but I would rather not reload the menu and use an iframe. So how can I keep my menu buttons with the current page active state in relation to the corresponding page in the iframe?

How do I attach a set of behaviors to the links on load of the window?

Any he开发者_高级运维lp is appreciated! THANKs


This post discusses how to attach events to communicate between the parent site and the iFrame. http://ajaxian.com/archives/cross-domain-iframe-communication-without-location-polling

However, you MUST be loading the iFrame resource from the same domain as your parent site and have control over the scripts loading on that page. Otherwise it falls into the cross-domain request category and it would be difficult to accomplish this. This limitation is by design as it would present major security issues.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜