#11425 closed bug (invalid)
serialize() and custom input atributes dont work
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | low | Milestone: | None |
Component: | ajax | Version: | 1.7.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
<form id="lol" method="post" action="?" zidprofile="210" zmarked="true" referer="http://yahoo.com/"> <input type="text" name="age" value="22" /> <input type="text" name="name" value="Jhon" ztarget="415" /> <input type="text" name="mail" value="[email protected]" zcodeg="inner" /> <input type="submit"> </form> <script> alert($('#lol').serialize()); // age=22 only? </script>
Change History (4)
comment:1 Changed 11 years ago by
comment:2 Changed 11 years ago by
Component: | unfiled → ajax |
---|---|
Priority: | undecided → low |
Resolution: | → invalid |
Status: | new → closed |
That is incorrect usage of .serialize() and invalid html (http://dev.w3.org/html5/spec/global-attributes.html#embedding-custom-non-visible-data-with-the-data-attributes). Please ask for support on the forums or on the #jquery irc channel.
comment:3 follow-up: 4 Changed 11 years ago by
$('input[zcodeg="inner"]').each(function(){ alert($(this).attr('name')); });
Is invalid?
comment:4 Changed 11 years ago by
Replying to anonymous:
$('input[zcodeg="inner"]').each(function(){ alert($(this).attr('name')); });Is invalid?
Valid from JavaScript but no jQuery? This work!: http://code.google.com/p/form-serialize/
Note: See
TracTickets for help on using
tickets.
Mirror: http://stackoverflow.com/questions/9519307/jquery-serialize-error-in-inputs-with-extra-property