Reputation: 35
I have a several rails link_to helper that opens modal windows that works fine however I also need to use a select box to choose a status and on change of the select I need to open a link depending on the status value of the select.
Example of my link
<%= link_to "Fact Find", fact_find_email_path(@opportunity.contacts.first.id), {:remote => true, 'data-toggle' => "modal", 'data-target' => '#fact_find'} %>
jquery script I have so far
$('#status').change( function() {
//some if statement to eval selection e.g if #status == 'Fact Find'
// Then open the link as above
});
Upvotes: 0
Views: 102