A form element cannot be inserted into a table element like that.  You
can put it inside the td element or outside the table element, but not
in between the table and tr.

IE doesn't enforce that, Firefox does.

Greg

> -----Original Message-----
> From: [EMAIL PROTECTED]
[mailto:rails-spinoffs-
> [EMAIL PROTECTED] On Behalf Of Maninder, Singh
> Sent: Wednesday, April 05, 2006 11:27 AM
> To: rails-spinoffs@lists.rubyonrails.org
> Subject: [Rails-spinoffs] Firefox - Form within a table issue
> 
> Hi,
> 
> Has anyone seen this issue before?
> 
> Oversimplified Problem:
> 
> I have a table within which I have a form -
> 
> <body>
>   <table>
>     <tbody id='table_body'>
>       <form id='table_form'>
>         <tr>
>           <td><input type=text name=name value=mandy> <br /> <input
> type=text name=age value=26> <br /></td>
>         </tr>
>         <tr>
>           <td><input type=button name=serialize_form
value=serialize_form
> OnClick="alert(Form.serialize('table_form'))"></td>
>         </tr>
>       </form>
>     </tbody>
>   </table>
> </body>
> 
> Somehow, whenever I have such a case, Form.serialize() returns empty
in
> FIREFOX (IE WORKS FINE).
> 
> As soon as I put my form outside the table it starts working, ie the
> following code works.
> 
> <form id='table_form'>
> <body>
>   <table>
>     <tbody id='table_body'>
>         <tr>
>           <td><input type=text name=name value=mandy> <br /> <input
> type=text name=age value=26> <br /></td>
>         </tr>
>         <tr>
>           <td><input type=button name=serialize_form
value=serialize_form
> OnClick="alert(Form.serialize('table_form'))"></td>
>         </tr>
>     </tbody>
>   </table>
> </body>
> </form>
> 
> Well, if it's such an easy fix, why don't I do it? The reason is
> maintenance of legacy code that has a nested structure of tables so
before
> I take the re-scripting approach, if someone has a fix for this it
would
> be great if you could share.
> 
> Thank you,
> Mandy.
> _______________________________________________
> Rails-spinoffs mailing list
> Rails-spinoffs@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to