This should be a common answer but I've searched and can't find it. I created a <div class"xyz" style= "display:none"
which houses a partial. The form I submit is a get request on the index of my view's controller. I have no problem running javascript on form submission, but I want to perform some javascript after the page reloads so I can unhide my div. Keep in mind this is not a remote ajax form.
index.html.erb: Here is the div that is hidden that I want to unhide after page reloads:
<div class="six wide column" >
<div id="clients_piece_tab_container" style="display: none;">
<%= render :partial => 'client_piece_tab'%>
</div>
</div>
index.html.erb My form submits on the index using a form_tag
<%= form_tag('clients', action: :index, method: :get) do%>
<%= render :partial => 'update_available'%> # <--Not the div/partial Im trying to unhide.
<br/>
<div class="four wide column"> <%=submit_tag "Get Clients", class: "ui primary button"%></div>
<%end%>
What I think I know is that I should be able to trigger index.js.coffee after the get request completes. But I've tried the following with errors about 0 arguments of 1:
clients_controller.rb
respond_to do |format|
format.js {}
end