I\'m submitting a form to my rails app, with two submit buttons. They both go to the same controller action, and use the same form, but on one submit action i want to make
In order to handle all submit cases (not just clicks) I would do something like the following:
submit
$("form").submit(function(e) { if($(e.srcElement).is(".popup")){ $(this).attr("target", "_blank"); } });