Bug Tracker

Modify

Ticket #2952 (closed bug: invalid)

Opened 5 years ago

Last modified 4 years ago

jquery.form.js have error in IE with a file-form

Reported by: fuksito Owned by:
Priority: major Milestone: 1.3
Component: plugin Version: 1.2.5
Keywords: form ajaxSubmit Cc:
Blocking: Blocked by:

Description

When trying to use jquery.form.js with function ajaxSubmit to post some form with file there is an error that crashes all submiting. These error is only reprodused in IE (6, 7, 8) and jquery 1.2.4 and greatier (all is ok in 1.2.3). The error is: "Breaking on JScript runtime error - Object doesn't this property or method" And also it says that these error is on line 1071 of jquery.js The line 1071: "elem[ name ] = value;"

Also here is html for a file with wich you can reproduce these bug: <script type="text/javascript" src="jquery-1.2.6.js"></script> <script type="text/javascript" src="jquery.form.js"></script> <script type="text/javascript"> $(document).ready( function(){ });

function submit_new_avatar(form) { $("#cont").html('prepare');

var options = {

beforeSubmit: validate_form, success: success_new_avatar, error: submitError, dataType: 'json'

};

$(form).ajaxSubmit(options); return false; }

function validate_form (){ $("#cont").append("<br>started"); }

function submitError (){ $("#cont").append('<br>error'); }

function success_new_avatar (data) { $("#cont").append("<br>ended"); }

</script>

<body>

<form onsubmit="return submit_new_avatar(this);" id="new_avatar_form" method="post" enctype="multipart/form-data" action="/main.fcgi">

<input type='hidden' name='action' value='save_new_avatar' />

<table class="form"> <tr>

<td class="left"></td> <td class="right">Choose picture:<br /><input type="file" name="file1" /></td>

</tr> </table>

<input type="submit" value=" Upload " /><input type="reset" value="Cancel" />

</form>

<div id="cont"></div>

</body>

Attachments

ie.html Download (1.2 KB) - added by fuksito 5 years ago.

Change History

Changed 5 years ago by fuksito

comment:1 Changed 5 years ago by fil

Maybe similar to #3052

comment:2 Changed 5 years ago by fuksito

No, the problem is still with patch from #3052

comment:3 Changed 5 years ago by fuksito

I found the thing that made an error. It was becouse I had input with name=action, without input with such name all goes ok, don't know why but obly this name of input makes an error.

comment:5 Changed 4 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to invalid

This is not a jQuery core bug. Please report plugin bugs to the plugin's author, or ask on the jQuery forums. jQuery UI bugs should be reported on the UI bug tracker,  http://dev.jqueryui.com .

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.