hello list I have a problem with form_for and :onsubmit this is may code <div id="note"> <% 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 %> </div> when I click in buttom nothing happen with javascript function valor(), I don´t see the alert this is my html code <div id="note"> <form onsubmit="valor();" method="post" action="/accions/anadir"> <div style="margin: 0pt; padding: 0pt;"> </div> <table width="700" border="1"> </table> </form> </div> but i don´t find the javascript code of javascript_tag any idea??? thanks for all -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---