Bug Tracker

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#9863 closed bug (invalid)

Error serializing fieldset in chrome

Reported by: andresote Owned by:
Priority: low Milestone: None
Component: ajax Version: 1.6.2
Keywords: Cc:
Blocked by: Blocking:

Description

Here is the code to reproduce this issue:

<html>
<head>
	<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.js'></script>
</head>
<body>
	<form id='test' method="POST" action="#">
		<fieldset>
			<input type="radio" value="3" name="param" CHECKED />
		</fieldset>
		<input type="submit">
	</form>
	<script>
	$(document).ready(function() {
		var value = $('#test fieldset').serialize();
		if (value == 'param=3') {
			alert('success');
		} else {
			alert('fail');		
		}
	});
	</script>
</body>
</html>

fails:

  • Chrome 12.0.742.124 on Ubuntu
  • Android Browser v 2.3.3

works:

  • Firefox 5.0

Change History (2)

comment:1 Changed 8 years ago by timmywil

Component: unfiledajax
Priority: undecidedlow
Resolution: invalid
Status: newclosed

The .serialize() method should be called on a form or on a set of inputs.

comment:2 Changed 8 years ago by anonymous

ok. Then the selector should be $('#test fieldset input')

thanks

Note: See TracTickets for help on using tickets.