Forum: Ruby on Rails Add items to select_tag?

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.
Wai T. (Guest)
on 2007-02-20 18:06

I have been struggling with the select tag for the last two days.  Does
anyone know how to change the content of a select_tag?  More
specifically, I have a list of items on another select_tag.  I would
like to make it so that the user can add the items into their own list.
I tried this in my controller (with KRJS plugins)

def on_item_list_dblclick
    render :update do |page|
      page['user_list'].add = params[:dom_value]

Changing text in a textbox is simple, but I can't find any documentation
about how to add to a select list.  Any help would be appreciated.
Thank you.
Wai T. (Guest)
on 2007-02-21 00:19
It seems like page['user_list'].add takes two arguments, both of which
should be DOM element object.  How do I create DOM element object in
This topic is locked and can not be replied to.