S
simon.niederberger
Hi all
I'm developing a web-app for IE (7, 8) which has following reporting
feature:
The main window of the application contains a menu and some other
buttons, plus an IFRAME hosting the current application page. The main
window is 'load once'. Reports open in a new 'top' window (i.e. new
tab or new window, depending on the user's IE settings). Reports may
contain links. If the user clicks on a link, it should open in the
IFRAME of the main window.
top1: main window -> IFRAME
top2: report window with Links
Setting a 'target' on the links to the IFRAMEs name (or that of
iframe.contentWindow) doesn't work. It seems to me that the report
window is simply not aware of the IFRAME in the other window. As both
windows originate from the same domain, I guess cross-site scripting
shouldn't be an issue and somehow I should be able to get hold of the
other window. If yes, I could set the src there with Javascript.
report window: a href="#" onclick="loadLinkInIframe('targeturl.html')"
function loadLinkInIframe(targeturl) {
var topwnd = WHAT GOES HERE?
var ifrm = topwnd.frames['bodyframe'];
ifrm.src = targeturl;
}
Thanks
Simon
I'm developing a web-app for IE (7, 8) which has following reporting
feature:
The main window of the application contains a menu and some other
buttons, plus an IFRAME hosting the current application page. The main
window is 'load once'. Reports open in a new 'top' window (i.e. new
tab or new window, depending on the user's IE settings). Reports may
contain links. If the user clicks on a link, it should open in the
IFRAME of the main window.
top1: main window -> IFRAME
top2: report window with Links
Setting a 'target' on the links to the IFRAMEs name (or that of
iframe.contentWindow) doesn't work. It seems to me that the report
window is simply not aware of the IFRAME in the other window. As both
windows originate from the same domain, I guess cross-site scripting
shouldn't be an issue and somehow I should be able to get hold of the
other window. If yes, I could set the src there with Javascript.
report window: a href="#" onclick="loadLinkInIframe('targeturl.html')"
function loadLinkInIframe(targeturl) {
var topwnd = WHAT GOES HERE?
var ifrm = topwnd.frames['bodyframe'];
ifrm.src = targeturl;
}
Thanks
Simon