I want to generate xls reports for AJAX search results. Is it possible to pass params for generating Excel document or add params in URL ?
Here is how I generating URL for downloading XLS document:
<%= link_to url_for(request.params.merge({:format => :xls})) do%>
<%= image_tag("excel.png")%> <b>Export</b>
<% end %>
and it is working with standard search, but not with AJAX.
My js code for AJAX search
$('#run_report').submit(function () {
$.get(this.action, $(this).serialize(),'script');
return false;
});
Can someone suggest how to do it ?