The answer is yes but you will need to make additional things to make this work. Basically, an iframe has access to the window object of the parent using window.parent. Therefore a simple way of making bar available to the iframe is
function bar() { alert("foo"); }
window.bar = bar;
In the iframe you can then call:
window.parent.bar();
For objects the same rules apply. Please note that both the main window and iframe must come from the same origin (domain) else browsers will block this.
dark_charlie
2010-07-27 18:36:06