1
我有一個Tapestry區域,其中有一個元素。我想在iframe完成加載時運行一個簡單的JS函數(隱藏並啓用一些東西,沒什麼奇怪的)。IE中的iFrame OnLoad事件在Tapestry區域更新後未觸發
在Chrome和Firefox,它工作得很好,但我有問題與IE 9
function afterExportLoad() {
// hide throbber gif
// enable submit button
}
所以,natually,我試着結合它的iframe像這樣(在線)
<iframe onload="afterExportLoad()" .../>
經由PrototypeJS
經由本地JS
exportFrame.observe('load', afterExportLoad);
if (window.addEventListener) {
exportFrame.addEventListener("load", afterExportLoad, false);
} else if (window.attachEvent) {
exportFrame.attachEvent("onload", afterExportLoad);
} else {
exportFrame.onload = afterExportLoad;
}
使用上面的任何方式,它可以工作在除IE之外的所有內容中,但在IE中,加載iframe之後,gif會「凍結」並且該按鈕仍處於禁用狀態。
有沒有辦法讓它在IE9(也可能是任何其他IE版本)中工作?
謝謝:)