Cheers,
I stumbled over a problem/bug with form_remote_tag.
I have a view with
<%= form_remote_tag(:update => "update_div",
:url => { :action => :top_flop },
:loading =>
"Element.show(''top-flop-indicator'')",
:complete =>
"Element.hide(''top-flop-indicator'')",
:html => { :id => ''top_flop_form'',
:name =>
''top_flop_form''}
) %>
In the form there are severeal select like this:
<select name="region">
<option value="">All regions</option>
<%= options_from_collection_for_select @regions,
''shortname'',
''name'',@request.params["region"][0].to_s %>
</select>
The problem is that if the form is posted through AJAX and the first option
is selected, not the value filed is submitted (in this case the
value="")
but the string between the option-tags (in this case the ''All
regions'').
This does not happen with a "normal" form tag. With the normal form
tag the
value field is submitted.
I''m using protoype 1.4pre2 and also tried 1.4pre3.
Greets,
Jonathan
--
Jonathan Weiss
http://blog.innerewut.de