Skip to main content

Bug Tracker

Side navigation

#11425 closed bug (invalid)

Opened March 01, 2012 04:05PM UTC

Closed March 01, 2012 04:17PM UTC

Last modified March 01, 2012 04:31PM UTC

serialize() and custom input atributes dont work

Reported by: zkizzik@gmail.com 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="test@gmail.com" zcodeg="inner" />
   <input type="submit">
</form>
<script> alert($('#lol').serialize()); // age=22 only? </script>
Attachments (0)
Change History (4)

Changed March 01, 2012 04:17PM UTC by timmywil comment:2

component: unfiledajax
priority: undecidedlow
resolution: → invalid
status: newclosed

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.

Changed March 01, 2012 04:29PM UTC by anonymous comment:3

$('input[zcodeg="inner"]').each(function(){
  alert($(this).attr('name'));
});

Is invalid?

Changed March 01, 2012 04:31PM UTC by anonymous comment:4

Replying to [comment:3 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/