AjaxFileUpload(2)Trouble Shooting

AjaxFileUpload(2)Trouble Shooting

Access is Denied
Most browsers prevent submitting files when the input field didn't receive a direct click (or keyboard) event as a security precaution. Some browsers (e.g. Google Chrome) simply prevent the click event, while e.g. Internet Explorer doesn't submit any files that have been selected by a programmatically triggered file input field.
Firefox 4 (and later) is so far the only browser with full support for invoking "click"-Events on a completely hidden (display: none) file input field.

This is the problem for ajaxfileupload and jqueryfileupload from my understanding.

solution:
I will check the version of browser, if they do not support that security precaution, I will use directly click.

private boolean isIE(HttpServletRequest request) {
logger.info("useragent = " + request.getHeader("USER-AGENT").toLowerCase());
return request.getHeader("USER-AGENT").toLowerCase().indexOf("msie") > 0 ? true
: false;
}

<!--[if IE]>
<style>
#filemaps{ display:block ;}
form label {float:left;}
</style>
<![endif]--> 

Downlaod the IE multiple versions from here:
http://dl.dbank.com/c0ixfbqjep

http://stackoverflow.com/questions/5276653/jquery-trim-ie-browser-compatibility-question

Try changing:

visiblePara.text().trim().length

to:

$.trim(visiblePara.text()).length

for IE8

references:
http://stackoverflow.com/questions/10504945/javascript-exception-uncaught-typeerror-converting-circular-structure-to-json
http://stackoverflow.com/questions/210643/in-javascript-can-i-make-a-click-event-fire-programmatically-for-a-file-input

http://stackoverflow.com/questions/10482265/js-submit-access-denied-iframe-ie

http://stackoverflow.com/questions/2276374/access-is-denied-when-script-tries-to-access-iframe-in-ie8
http://www.webdeveloper.com/forum/showthread.php?t=181272
http://stackoverflow.com/questions/3935001/getting-access-is-denied-error-on-ie8
http://my.opera.com/justnewbee/blog/ajaxuplod-accessibility-ie-access-denied

你可能感兴趣的:(ajaxFileUpload)