From: Andres Montano Date: 2005-08-08T13:01:08+09:00 Subject: Re: on ruby on rails and forms Thanks for the quick reply Julian. I will provide more detail here. I have two tables: roles and permissions with a "has_and_belongs_to_many" relationship between each other. In the edit action for role, I initialize role and permissions like this: @role = Role.find(@params[:id]) @permissions = Permission.find (:all, :order => "title") In the model I have two lists: one with all the available permissions and another with the permissions that a specific role has and buttons that move stuff from one list to the other using javascript. The rhtml code for the lists goes like this: I have two buttons invoke a javascript method to remove an item from one list and add it to the other list. It goes like this: function moveSelected(orig, dest) { var selectOrig = document.getElementById(orig); var selectDest = document.getElementById(dest); var i = 0; while (i wrote in message news:EE4E8D2C-7BDA-41E2-86E2-AC2C6042A33A@coretech.net.au... > Hi. > > I wonder if there's a rails list... > > Can you be more specific? > > So you've got your helper code down to create HTML select, that's cool... > but what do you mean by "use modifies the options via javascript" - how? > > Julian. > > On 08/08/2005, at 12:01 PM, Andres Montano wrote: > >> Does anybody know if the options for a select in a form are accesible >> via >> @params? >> >> I have an application that succesfully builds the select html statements >> but >> then the user modifies the options via javascript. When the form gets >> posted, is there a way to know what options are there, which are >> selected, >> etc from the controller? >> >> I have tried all sorts of strategies like adding the [] to the name of >> the >> select tag, but however I name it, param always returns nil. >> >> Thanks, >> Andres >> >> >> >> > > >