The following link works fine in Chrome and Edge, but doesn't in Firefox and IE. Checking the network graph for both show that the request is not sent. Holding my mouse over the link in Chrome and Edge will show an underline under the text and the destination at the bottom of the page. Firefox and IE do not show these, so it appears that IE and Firefox do not recognize this as a link
<a data-remote="true" rel="nofollow" data-method="post" href="/fetch_data?macaddress=ACB3131B6445&time=hour">Hour</a>
Link is generated with:
<%= link_to "Hour", fetch_data_path(time: "hour", macaddress: @macaddress.to_s), method: :post, :remote => true %>
Edit: Jquery version is the latest, 3.1.
application.js:
//= require jquery3
//= require jquery_ujs
//= require_tree .
Turns out my laziness was the cause.
I initially made my buttons incorrectly such that they only worked if you clicked on the text of the link rather than the whole button working as a button:
<button class="btn btn-default" type="button">
<%= link_to "Day", fetch_data_path(time: "day", macaddress: @macaddress.to_s), method: :post, :remote => true %>
</button>
Finally decided that I should fix this and after recreating the link it worked fine in firefox:
<%= link_to fetch_data_path(time: "day", macaddress: @macaddress.to_s), method: :post, :remote => true do %>
<div class="btn btn-default" type="button">Day</div>
<% end %>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With