IE7 problem fileupload loosing focus

IE7 problem fileupload loosing focus

Hi, i m  looking for an other solution.

I have a little script, which uploads a file after i select it.
It works fine. There was a problem with the ie7 which looses the focus.
As you see in the small javascript i have a function called fixFocus, which is called onchange.
I tried to make it all with jquery without using the onchange function, but i failed.

How must i change the first script, to get it work without using the onchange function in the html?

I use jquery 1.4

Thanks!

Frank




  1. $(document).ready(function() {
        $("input[type=file]#datei").change(function() {
            $('span#infoUpload').html('<b style="color:red;">Datei wird hochgeladen. Bitte warten...</b>');
            $('form#formDokumente').submit();
        });
     });
    function fixFocus() {
        this.blur();
    }







       

       
  1. <input size="40" type="file" name="datei" id="datei" onchange="fixFocus()"><br>