hey fellow jQuery-ers,

I've noticed this small thing using the serializeArray() on a form.

consider the following html:

<html>
 <head>
 </head>
 <body>
  <form id="frmFoo">
   <select id="mySelect">
    <option value="0">add</option>
    <option value="1">edit</option>
    <option value="2">whatever</option>
   </select>
  </form>
 </body>
</html>

it has a simple form with a select tag. nothing fancy here.

I want to serialize the form's input values so I do this in firebug:

>>> $("form#frmFoo").serializeArray()
[]
>>> $("form#frmFoo").serialize()
""

the strange thing here is that won't return anything at all....nada!
it's either an empty string or an empty array.
It will work once I add a a "name" attribute to the select tag:

>>> $("form#frmFoo").serialize()
"mySelect=0"
>>> $("form#frmFoo").serializeArray()
[Object name=mySelect value=0]

are there some html specs I missed on the matter?

Bernard

Reply via email to