#13 ✓invalid
Anthony Hildoer

Form.serialize() not handling textareas

Reported by Anthony Hildoer | April 15th, 2008 @ 06:56 AM

There seems to be a problem serializing forms with text areas, such as when submitting an AJAX request. Only data that was in the innerhtml of the textarea during page load is serialized. So, any data that was added, or that was modified in the textarea by the user does not show up in the serialization. I have modified a copy of prototype 1.6.0.2 and it seems to work now. But, I am pretty sure there is a more elegant solution than mine. I have attached my modification so you can diff it and see the change.

Also, this problem occurs in both firefox 2.0 and IE7.

To recreate the problem, create an html form. include this tag:

Have the form serialize on submit then echo or alert the serialized string. Make sure to enter some data before submitting the form. you will see that the serialized string only contains "data=" and not "data=[SOME DATA YOU ENTERED]".

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

The Prototype JavaScript library.

Shared Ticket Bins

Attachments

Pages