The serialize method creates a string in the name=value format, so you
must give the input a name:
<input name="myname" type="text" value="3" size="2" />
It'll alert 'myname=3' then.
Best,
Fabio
On 20 dez, 00:25, Jonah <[EMAIL PROTECTED]> wrote:
> Hi,
>
> The following code is alerting an empty string for me. Any ideas on
> what could be causing it?
>
> Thanks,
> Jonah
>
> -----------------------------------
>
> <form id="testform">
> <input type="text" value="3" size="2">
> </form>
> <script>
> alert($('testform').serialize());
> </script>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---