document.getElementById("iframe_id").onload does not work in IE
I'm using the hidden iframe method for file upload and it does not work properly in IE. The problem is that the function to be called after the server response is not called in IE.
The line isdocument.ge开发者_StackOverflow社区tElementById("iframe_id").onload = uploadDone;
I also tried window.iframe_id.onload
, document.iframe_id.onload
, etc
I don't think that there is any other error in code as this works fine in FF and Chrome.
I tried an alert instead of the function name (uploadDone) and it works (though shows an error in the script debugger). But replacing the complete function, like:
...onload = function () {...};
there works neither.
Can somebody help me make this work in IE?
Thanks in advance.I would highly recommend you look into using JQuery or another javascript framework. It will save you a lot of pain....
You can
window.onload = Startup
in the frame document and from there call whatever function you want in the parent document.
I can look for some code if you want...
精彩评论