Click here to Skip to main content
13,090,299 members (77,496 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as

Stats

13.2K views
2 bookmarked
Posted 25 Feb 2012

Workaround for Valums AJAX File Upload IE9 Issues

, 25 Feb 2012
Rate this:
Please Sign up or sign in to vote.
Workaround for Valums AJAX File Upload IE9 issues

Andrew Valums wrote an excellent JavaScript upload script for uploading multiple files in browsers that support it. Unfortunately, it doesn’t work completely in IE9 (the upload progress indicator hangs). I’m sure that in the near future a fix will be available but if you need to get it to work today, one workaround is to enable IE 9 compatibility mode.

By adding a header in the head section of your HTML, you can enable IE7 compatibility mode.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="X-UA-Compatible" content="IE=7" >
</head>
</html>

It’s also possible to add this header in IIS (assuming you are using IIS, in other webservers probably a similar approach is available) to enable it site wide, if you don’t have the freedom to add the header in the HTML of existing websites.

Note: Enabling compatibility mode can have consequences for other parts of your website as well, be sure to properly test everything before applying this change.

This gets the plug in to work properly under IE9. It’s probably not the best solution, but it’s a workaround that fixed it for me in this scenario.

Sidenote: Make sure that the response of the upload is returned with the content type text/html. Internet Explorer doesn’t know what to do with the content type application/json.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

wullinkm
Software Developer Dexchange Outsourcing
Netherlands Netherlands
No Biography provided

You may also be interested in...

Comments and Discussions

 
-- There are no messages in this forum --
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170813.1 | Last Updated 25 Feb 2012
Article Copyright 2012 by wullinkm
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid