Bug Tracker

Modify

Ticket #4039 (closed bug: duplicate)

Opened 4 years ago

Last modified 4 years ago

Error updating form attributes in IE

Reported by: malsup Owned by:
Priority: major Milestone: 1.3.2
Component: core Version: 1.3.1
Keywords: Cc:
Blocking: Blocked by:

Description

IE issue:

If a user creates a form with inputs named "action" or "method" jQuery fails when attempting to update the method or action attributes of the form object. This becomes a problem for the Form Plugin which tries to do the following when uploading files:

$form.attr({
    target:   id,
    method:   'POST',
    action:   opts.url
});

In IE, this fails in jQuery 1.3.1 at line 985 (attr fn):

elem[ name ] = value;

Turns out that this also fails in jQuery 1.2.6 but not in jQuery 1.2.3.

A test page is available here:

 http://jquery.malsup.com/form/action.html

Change History

comment:1 Changed 4 years ago by dmethvin

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

Duplicate of #3113

comment:2 Changed 4 years ago by malsup

Oops, sorry for the dup. Footnote: version 2.19 of the From Plugin works around the problem using setAttribute instead of $.fn.attr.

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.