Bug fix : JQuery Uploadify / Internet explorer / Flash Undefined error

I had the problem that the upload component did not work with a client of mine on different versions of IE .

This is appearantly due to the way flash works with dynamic flash components located within form tags in internet explorer.
The fix is really easy, but it was really nasty to find the cause...

If your code looks like this :

             $("#FileToUpload").fileUpload({   ...    }); 

 <form>  <input type="file" id="FileToUpload"/></form>

just add a new line after 'uploadifying' the element :         

FileToUploadUploader=document.getElementById("FileToUploadUploader");

So you define a javascript global var with the name of your element+"Uploader", and assign the element to it....

That's all there is to it...

 

comments powered by Disqus