views:

41

answers:

2

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.

A: 

I would highly recommend you look into using JQuery or another javascript framework. It will save you a lot of pain....

Matt
.. not entirely sure whether jQuery will help in this particular case, though?
Pekka
ah okay, I stand corrected. Seems that it does: http://stackoverflow.com/questions/205087/jquery-ready-in-a-dynamically-inserted-iframe
Pekka
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
but there is no explicit source for the iframe document. It only loads the response from the server after file upload...
shyam
I suppose you show some confirmation page (html) after file upload?
pkario