Bug Tracker

Modify

Ticket #9437 (closed bug: invalid)

Opened 2 years ago

Last modified 2 years ago

prop('method) performed on a form element returns a bunch of elements that are named "method"

Reported by: davidtwtong@… Owned by: timmywil
Priority: high Milestone: 1.next
Component: attributes Version: 1.6.1
Keywords: Cc:
Blocking: Blocked by:

Description

See demo:  http://jsfiddle.net/davidtong/HFfTP/2/

prop('method') should be an empty string, but in reality (jQuery 1.6.1) it returns the three input elements named "method".

Change History

comment:1 Changed 2 years ago by rwaldron

  • Owner set to timmywil
  • Priority changed from undecided to high
  • Status changed from new to assigned
  • Component changed from unfiled to attributes

comment:2 Changed 2 years ago by timmywil

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

This is how properties of a form are designed to work. If you'd like to retrieve the method attribute, use attr.  http://jsfiddle.net/timmywil/HFfTP/3/

comment:3 Changed 2 years ago by rwaldron

@timmywil thanks for sorting that quickly, sorry for the false alarm.

comment:4 Changed 2 years ago by timmywil

No problem. This is why forms get special treatment in IE when trying to retrieve and set their attributes. Even with get/setAttribute, IE6/7 will get and set the property instead.

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.