Observer Form

I have a form observer wich posts back a form correctly, however, i need
to know which item caused the form observer to trigger and what the
value of that field is. At the moment i get the whole form back but
dont know which field triggered the call back.

<%= observe_form(‘test’,
:on => ‘click’,
:url => {:controller => ‘test’, :action => ‘test’},
:before => “Element.show(‘imgSpinner’)”,
:success => “Element.hide(‘imgSpinner’)”) %>

JB

Ye thats what i would normally do but im having an issue where the field
observer will only work once and then wont trigger again. Ive found
away around that issue but was wondering if there was an easy way to
submit the form but als the element that has triggered the form event.

Ryan B. wrote:

How many fields are you monitoring in this form? It may be worth while
to
have it using observe_field rather than observe_form, because that
should be
able to pass in what the name of the element is that triggered it.

On Mon, May 19, 2008 at 6:58 PM, John B. <
[email protected]> wrote:

            :success => "Element.hide('imgSpinner')") %>

JB

Posted via http://www.ruby-forum.com/.


Appreciated my help?
Reccommend me on Working With Rails
http://workingwithrails.com/person/11030-ryan-bigg

How many fields are you monitoring in this form? It may be worth while
to
have it using observe_field rather than observe_form, because that
should be
able to pass in what the name of the element is that triggered it.

On Mon, May 19, 2008 at 6:58 PM, John B. <
[email protected]> wrote:

            :success => "Element.hide('imgSpinner')") %>

JB

Posted via http://www.ruby-forum.com/.


Appreciated my help?
Reccommend me on Working With Rails
http://workingwithrails.com/person/11030-ryan-bigg