jquery ajax form plugin submit multiple times to the server only when using IE6
        Posted  
        
            by Dino
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Dino
        
        
        
        Published on 2010-05-20T18:05:37Z
        Indexed on 
            2010/05/20
            18:10 UTC
        
        
        Read the original article
        Hit count: 421
        
I all. I have the following form used to temporarily upload a photo on a j2ee server and then crop it with imageAreaSelect plugin :
<form name="formAvatarName" id="formAvatar" method="post" 
action="../admin/admin-avatar-upload" 
enctype="multipart/form-data">
<label>Upload a Picture of Yourself</label>
<input type="file" name="upload" id="upload" size="20" />
<input type="button" id="formAvatarSubmit" value="formAvatar" onclick="invia()"/> 
</form>
I am using jquery form plugin to do ajax submission, this is my last :) attempt :
   $('#formAvatar').unbind('submit').bind('submit', function() {
     alert('aho');
        $(this).ajaxSubmit(options);
        return false;
   }); 
Only when tested with IE6 I can see that the sumbission to the server is done multiple times (first time I got the uploaded file, the other times the sumbmission seems empty and I got error). With IE7, IE8, FFOX, CHROME is working fine. Any Ideas? Many thank in advance!
© Stack Overflow or respective owner