Forum: Ruby on Rails AJAX update for select list onchange?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Dean (Guest)
on 2006-02-10 03:01
(Received via mailing list)
Hi Rails Users,

I have a select list that I'd like to use to update a div onchange.

Right now I just have the div appear, but not update:

<%= select_tag( "profiles_select", option_tags = @profiles,
                 { :onchange => "new Effect.Appear('the_profile',
                                                  { duration: 0.5 } );"
               } )

@profiles is a list of option tags something like:

<option value=1>Profile 1</option><option value=2>Profile 2</option> etc

I'd like to do a new AJAX request and make the div appear onchange of
the select
tag using the option value.  Is there an easy way to do this?

Take your time, take your chances
[3278.7 km, 273.4] Apparent Rennerian
It matters not how strait the gate, / How charged with punishments the
I am the master of my fate: / I am the captain of my soul.        --
Invictus --
                                                           -- William E
Henley --
This topic is locked and can not be replied to.