I saw an important error on file upload.
1) in a form put an input file and submit it
2) on subimit in php check the limit of file
3) if excend the limit, then treat it in response (an alert appear)
I mention that form doen't have action atribute.
If you try again (without refresh) to submit the form in some browsers (IE specialy) you will see that the "url" variable is equal with string 'undefined'. Put there an alert message to see it (line 75).
Solution for me is to put in line 75 this sequence:
url = window.location.href;
Another strange problem is if I try to upload a big file (70M) . Seems that the script is blocked.