I need to create a button for downloading So far I have create a button using this
<%= form_tag /myproject/download , :multipart => true, :onclick=>"document.getElementById( popup ).style.display= block ; return true;" %>
<%= submit_tag Download %> <% end %>
but I don"t know how to link the submit_tag with the link of downloading. (so as simple as if I press the button, then it will go to localhost/file and pop up a save to option) I am aware that I can use link_to, but I need to put a button that acts as a link_to
有人能指出如何在铁轨上做到这一点吗?非常感谢。