hello list
I have a problem with form_for and :onsubmit
this is may code
<% javascript_tag do %>
function valor(){
alert('aqui');
}
<% end %>
<% form_for :accion, :url=>{:controller=> “accions”, :action=>
“anadir”}, :html=>{:onsubmit=>“valor();”} do |f| %>
…
<%= f.submit “Go” %>
<%end %>
when I click in buttom nothing happen with javascript function valor(),
I don´t see the alert
this is my html code
but i don´t find the javascript code of javascript_tag
any idea???
thanks for all