Side navigation
#5644 closed bug (duplicate)
Opened December 11, 2009 07:53PM UTC
Closed December 11, 2009 10:27PM UTC
Form attributes mishandled by attr() when fields share names with attributes
Reported by: | kenaniah | Owned by: | |
---|---|---|---|
Priority: | critical | Milestone: | 1.4 |
Component: | core | Version: | 1.3.2 |
Keywords: | form, attr, attribute | Cc: | |
Blocked by: | Blocking: |
Description
Consider the following form:
<form id="frm" action="search.html" method="post"> <input type="hidden" name="action" value="search" /> <input name="term" value="" /> <input type="submit" value="Search" /> </form>
One would expect '''$("#frm").attr('action') to return search.html. Instead, the attribute look up fails. I believe this is because document.getElementById("frm").action returns the <input> element instead of the attribute node. jQuery should instead utilize the form.attributes''' nodemap to access form attributes, because named form fields are promoted to direct children of the form node and effectively override the attribute nodes when attribute names and field names collide.
Attachments (0)
Change History (1)
Changed December 11, 2009 10:27PM UTC by comment:1
resolution: | → duplicate |
---|---|
status: | new → closed |
This is a duplicate of #3113.