[Rails] form_for with :onsubmit

2009-01-30 Thread Maite Piedra
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

[Rails] Re: save value of text_field in the view

2009-01-28 Thread Maite Piedra
Hello list I have the same problem yet I dont catch value of text_field in the same erb.html file. any idea??? thanks again. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[Rails] Re: save value of text_field in the view

2009-01-26 Thread Maite Piedra
Maurício Linhares wrote: Could you please elaborate a little bit more? What do you mean by saving in the same view? I want to catch the value of num_titulos for pass this value to action comprueba, but I don´t know how I do it. tdpbnumero de titulos a comprar: /b%= f.text_field

[Rails] Re: save value of text_field in the view

2009-01-26 Thread Maite Piedra
Ryan Bigg wrote: If it is inside a form and that form points to the right action then that field will be passed in via the params hash ok it is inside a form but I want before to click on the bottom submit I want to catch the value to pass for :onchange :onchange =

[Rails] save value of text_field in the view

2009-01-25 Thread Maite Piedra
hello everybody How I save de value of text_fiel in the same view %= f.text_field :precio_compra, :size= 10 % How do it??? thanks for all -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to

[Rails] Re: no call funtion

2009-01-18 Thread Maite Piedra
ok, the accion to controller is this def destroy empre=params[:id] empre=empre.to_i @todo=MercaUsuario.find(:all) @todo.each do |x| if (x.user_id == current_user.id)(x.empresa== empre) x.destroy end end end but link_to_remote no call function if I push debugger in

[Rails] no call funtion

2009-01-17 Thread Maite Piedra
hello everybody I have this in my view tr id= id_%= x.nombre% td width=200%= x.nombre%/td td width=10%= link_to_remote image_tag(delete.png), :url={:controller=merca_usuarios, :action=destroy, :id=x}, :complete = new Effect.Fade('id_#{x.nombre}') % /td when I click

[Rails] problem in text_field

2009-01-16 Thread Maite Piedra
hello everybody I have this text_field %= f.text_field :precio_compra, {:size= 10, :onchange = #{remote_function(:url={:controller= accions, :action= comprueba},:with = 'valor='+ 'accion[precio_compra]'.value)}} %/p but in comprueba funtion i have this =

[Rails] problem popup

2008-11-26 Thread Maite Piedra
hello list. I use popup in my project td width=10%= link_to image_tag(edit.png), edit_mercado_path(mercado), :popup =['subjects', 'width=500,height=500,toolbar=no,titlebar=no,status=no,left=500,top=300, scrollbars=yes']%/td I want that update method finish this new window (popup) close and