Bug Tracker

Modify

Ticket #5071 (closed bug: duplicate)

Opened 5 years ago

Last modified 5 years ago

Form attribute get/set breaks with same named input in form

Reported by: trmpowell Owned by:
Priority: minor Milestone: 1.4
Component: unfiled Version: 1.3.2
Keywords: Cc:
Blocking: Blocked by:

Description

Trying to get or set the attribute of a form does not work properly if there is an input in the form with the same name as the attribute trying to be gotten/set.

Example, this works:

$('#testform').attr('action', ' http://www.google.com').attr('target', 'test');

<form id="testform">

<input type="text" name="act" />

</form>

while this doesn't:

$('#testform').attr('action', ' http://www.google.com').attr('target', 'test');

<form id="testform">

<input type="text" name="action" />

</form>

Change History

comment:1 Changed 5 years ago by dmethvin

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

Duplicate of #3113.

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.