Currently I am using ajax to submit my sortable items, but I would like to do a non-ajax submit. Is that possible?
Current ajax post:
$("#create_items_form").submit(function() {
$.ajax({
type: "POST",
url: $(this).attr("action"),
dataType: "script",
data: $("#destination_items").sortable('serialize')
});
return false;
});
html:
<%= form_for(@items, :url => create_items_path, :html => {:id => "create_items_form"}) do |f| %>
<ul id="destination_items"></ul>
<%= f.submit "Save", :id => "create_items_button" %>
Because of that I get a nice array to use in my controller:
Params: "items"=>["8", "10"]
Is it possible make this information available via a normal submit?
Thanks!