im trying to call a function using the onclick method of a button. here is the code:
<%= button_to "Close" , :onclick => "show_back(), return false" %>
but this will not work, every time I click the error occours button
"No action responded to 29. Actions: check, create, delete, edit, search_picture, index, new, save_show, display and update"
be that as it may, when I implement the same in href, it works
<a onclick="show_back();return false;" href="#."> Close </a>
can someone tell me what i am doing wrong, thanks in advance.
source share