开发者

ie8 gives error "object does not support this method or property" on uploading a second image

开发者 https://www.devze.com 2023-01-28 16:45 出处:网络
I\'m trying to implement shift8creative\'s agile uploader.All works well in proper browsers, but ie is causing problems.

I'm trying to implement shift8creative's agile uploader. All works well in proper browsers, but ie is causing problems.

the page is here:https://www.postadigi.com/pages/upload-order

the line the js error is highlighting is here:

document.getElementById('agileUploaderSWF').sendForm();

Iv'e tried putting it in a onclick, a jquery click function. Same error.

NB, it compresses开发者_开发知识库 & uploads a first image fine, but then when a second image is selected and upload clicked, it fails.


OK, fixed it.

Internet explorer was caching the swf data as detailed here:

http://www.permadi.com/tutorial/flashcache/index.html

So thanks to a tip from Richard Grove on the plugins comments, i fixed it with a bit of trickery:

flashSrc: '/js/uploader/agile-uploader.swf?' + Math.random(),

Which seems to have convinced ie to not cache it.


document.getElementById('agileUploaderSWF').sendForm();
0

精彩评论

暂无评论...
验证码 换一张
取 消