AJAX form inside table - error

Hello,
I need to put an AJAX, form such that it is inside a table, and spans
across
few rows.
But, what I am noticing is that, while submitting the form, the data in
the
fields is not submitted.

If I move the form outside the table or inside a cell, things work OK,
but not
when the form is inside the table and spans few rows. This problem is
only
with AJAX forms, regular forms work perfect. I was wondering if this is
something to do with prototype, or am I doing something completely
wrong?

Below, is a stripped down version of the code, which I have been trying.
While
calling the action the parameter, member_id is not passed.

<%= form_remote_tag(:url => {:controller => 'relationships', :action => 'move'}) %> <%= hidden_field_tag 'member_id',10 %> <%= submit_tag "Save", :class => "button" %> <%= end_form_tag %>

Thanks for your help.

Surendra S.
http://ssinghi.kreeti.com, http://www.kreeti.com
Read my blog at: http://cuttingtheredtape.blogspot.com/
,----
| “All animals are equal, but some animals are more equal than others.”
| – Orwell, Animal Farm, 1945
`----

Hi Surendra,

I was recently trying to do the same thing and basically I discovered
that it’s not really possible to do this reliably because it doesn’t
conform to web standards and doesn’t seem to be supported by
browsers. I ended up fitting my form in a single td cell, although I
made the cell span several columns. I think it’s worth looking at the
code used by the ajax scaffold generator to get an idea of a possible
solution.

Good luck,
Sean

fwiw, having a form tag as a child to a table tag is not valid markup in
xhtml (and bad form in any other, in my opinion) .

Is there a particular reason why you put form tags within a table like
that
and not around the table or within a table cell?

Chris