[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EP-tech] Fix for UploadMethod_file_change in IE8

A minor bug in IE8 with file upload. The file input element on the upload screen isn't reset after  UploadMethod_file_change runs. Our users complained that they often then clicked upload and uploaded twice...

I think the problem is that .value is read-only in IE8. Microsoft say it is, for 'security reasons'. Certainly the input.value = null, doesn't work in IE8.

Anyway, a patch:

--- a/lib/static/javascript/auto/88_uploadmethod_file.js
+++ b/lib/static/javascript/auto/88_uploadmethod_file.js
@@ -339,6 +339,7 @@ function UploadMethod_file_change(input,component,prefix)

        input.value = null;
+       form.reset();
        form.removeAttribute( 'target' );
        form.setAttribute( 'action', orig_action );
        form.removeChild (input_component);



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20120809/e31baa3e/attachment.html