Modify ↓
Ticket #11425 (closed bug: invalid)
serialize() and custom input atributes dont work
| Reported by: | zkizzik@… | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | None |
| Component: | ajax | Version: | 1.7.1 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
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="test@gmail.com" zcodeg="inner" />
<input type="submit">
</form>
<script> alert($('#lol').serialize()); // age=22 only? </script>
Change History
comment:2 Changed 15 months ago by timmywil
- Priority changed from undecided to low
- Resolution set to invalid
- Status changed from new to closed
- Component changed from unfiled to ajax
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 15 months ago by anonymous
$('input[zcodeg="inner"]').each(function(){
alert($(this).attr('name'));
});
Is invalid?
comment:4 in reply to: ↑ 3 Changed 15 months ago by anonymous
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/
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

Mirror: http://stackoverflow.com/questions/9519307/jquery-serialize-error-in-inputs-with-extra-property