JS only works by updating the page

Asked

Viewed 51 times

0

Click on the button:

<td><%= link_to 'simulacao', simulacao_path(simulado) %></td>

on the simulation/id page there is another button that requires js, but it only works if I update the page

<%= form_tag('/correcao', method: :get, remote: true) %>

<%= button_tag 'Corrigir', class:'btn btn-primary btn-lg' %>

Routes:

get 'simulacao/:id' => 'simulados#simulacao', as: 'simulacao'
get '/correcao' => 'simulados#correcao'

I just note that even clicking on any link the button is without function:

<a href="#">nao faz nada</a>

a light? = D

  • Any error in js console?

  • No, he just has no action

  • Is there any way to show how the Html of the form? and the console log, just so we can diagnose?

  • Solved! a simple closed form in the wrong place, I’ve had many problems to load JS so the trauma. thanks for helping =D

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.