Reputation: 41
I am trying to set element from one iframe to another.
window.iframes["test"].document.getElementById('lDownload').setAttribute('target',"_blank")
//document.getElementById('lDownload').setAttribute('target',"_blank")
window.iframes["test"].document.getElementById('lDownload').setAttribute('href',downloadFilename)
}
else
{
//noProcess();
window.frames["test"].document.getElementById('lDownload').setAttribute('href',"javascript:noProcess()")
}
Upvotes: 1
Views: 391
Reputation: 2674
countRefreshes = 0;
function refreshIframe(which) {
var currHref = '' + parent.frames[which].location + '';
parent.frames[which].location.href = currHref + '?c=' + countRefreshes + '';
countRefreshes++;
}
Upvotes: 1
Reputation: 2674
parent.frames("test").yourIframeFunction();
OR
parent.frames[0].yourIframeFunction();
parent.yourMainDocumentFunction();
Upvotes: 1