Forum: Ruby on Rails how to use the observe_field to get more than one field?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
sreekanth.G (Guest)
on 2008-12-22 09:58
(Received via mailing list)
Hi,

I have two selctdropdown  boxes name like "resolution" and "codecname".

Now i am able to get the single field value either from resolution or
codecformat select box.
ex:
observe_field 'resolution'
or
observe_field 'codecforamt'

is there any way to get the two fields in to the observe_field method ?

Can anyone give me suggestionfs or ideas on this?

thanks
Srikanth
Hassan S. (Guest)
on 2008-12-23 05:23
(Received via mailing list)
On Sun, Dec 21, 2008 at 11:58 PM, sreekanth. G 
<removed_email_address@domain.invalid>
wrote:

> I have two selctdropdown  boxes name like "resolution" and "codecname".
>
> Now i am able to get the single field value either from resolution or
> codecformat select box.

> is there any way to get the two fields in to the observe_field method ?

Have you read the docs for the :with option? Seems like it should be
just what you need:

"A JavaScript expression specifying the parameters for the
XMLHttpRequest..."

--
Hassan S. ------------------------ removed_email_address@domain.invalid
Robert W. (Guest)
on 2008-12-23 14:49
sreekanth.G wrote:
> Hi,
>
> I have two selctdropdown  boxes name like "resolution" and "codecname".
>
> Now i am able to get the single field value either from resolution or
> codecformat select box.
> ex:
> observe_field 'resolution'
> or
> observe_field 'codecforamt'
>
> is there any way to get the two fields in to the observe_field method ?

Have you looked at the observe_form method. I think you use this if you
want to observe multiple fields in a form. I could be wrong, but at
least take a look at it.
This topic is locked and can not be replied to.