Hi,
i just want to create with Ror an event when a the mouse is over an
element. Is there any helper function like link_to_remote that
generates the code…
I need something like this
Thanks
Hi,
i just want to create with Ror an event when a the mouse is over an
element. Is there any helper function like link_to_remote that
generates the code…
I need something like this
Thanks
cfingerh,
i just want to create with Ror an event when a the mouse is over an
element. Is there any helper function like link_to_remote that
generates the code…
You are close: look at ‘link_to_remote’ source
http://caboo.se/doc/classes/ActionView/Helpers/PrototypeHelper.html#M005056
, and you’ll see that it calls ‘remote function’
http://caboo.se/doc/classes/ActionView/Helpers/PrototypeHelper.html#M005063
<a onmouseover=“<%= remote_function(:url => { :action => :bar }) %>”
foo
def bar
render(:update) { |page|
page.alert(‘bar’)
}
end
When would doing something like that be useful or better than just
embedding
the javascript?
Maybe if the stuff that you’d be mousing over was dynamic rather than
static?
Just curious.
On 5/10/07, Alain R. [email protected] wrote:
http://caboo.se/doc/classes/ActionView/Helpers/PrototypeHelper.html#M005056
Alain
–
Terry (TAD) Donaghe
http://tadspot.tumblr.com
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs