Calling Javascript function using observe_field

I’m trying to call a simple javascript function from within an
observe_field. It is possible to replace the :url with :function to
call a function. But since there are no examples, and I’ve tried a
bunch of iterations, can someone show me sample syntax?

I’d like to do something like:

<%= observe_field :FormOptions1,
:frequency => 0.25,
:function => “javascript:tcsValidateInput001()” %>

Has anyone done this sort of thing?

Thomas S. wrote:

Has anyone done this sort of thing?

Why not just use the onchange event of the field?

Jonathan

Thank you. That works.

Jonathan W. wrote:

Thomas S. wrote:

Has anyone done this sort of thing?

Why not just use the onchange event of the field?

Jonathan

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs