I''ve got a form with a paginator and I''d like to save the
contents of the
form whenever the user moves to a different page. Since the form contents
aren''t submitted when a link is clicked, I thought I''d just
change the
action of the form to the URL of the paginator link and then submit the form
using form.submit().
The form submits but I keep getting a 404 Not Found error when I click the
link. To isolate the problem, I put in the following submit button:
<input type=submit>
Still the same Not found error. Weird. Other forms in my app work with a
submit button. Upon some investigation, I''ve found that the submit
button
requires the name of the controller in the ''name'' attribute or
you get a Not
Found error. Replaced the submit button with the following:
<input type=submit name=''my controller name''>
Now the form submits as expected.
So, the questions are:
* why does the submit button require the controller name when it is present
in the form''s action attribute (action="controller/action")?
* how can I successfully submit a form after changing it''s action to
include the paginator parameters using javascript?
I''d like to avoid creating hidden fields for paginator params etc.
_______________________________________________
Rails mailing list
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails