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 is
document.getElementById("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.
views:
41answers:
2
A:
I would highly recommend you look into using JQuery or another javascript framework. It will save you a lot of pain....
Matt
2010-09-09 12:19:55
.. not entirely sure whether jQuery will help in this particular case, though?
Pekka
2010-09-09 12:21:24
ah okay, I stand corrected. Seems that it does: http://stackoverflow.com/questions/205087/jquery-ready-in-a-dynamically-inserted-iframe
Pekka
2010-09-09 12:22:15
A:
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...
pkario
2010-09-09 12:27:52