So it seems that you need to retrieve a select element with options via ajax somewhere in the page's javascript, instead of a json data payload, and place it in the document dinamically. I think that you could modify the controller to return a select object with a .load view and then append it to the document using the web2py.js javascript function web2py_ajax_page('get',action,null,target)
action is the .load url that returns the raw html string target is the id reference of the container tag. the .load view should create the needed tags with helpers and the database data with something like: {{ =SELECT(*[OPTION(...) for option in options]) }} On 15 feb, 13:37, Annet <anneve...@googlemail.com> wrote: > Hi Alan, > > Thanks for your reply. > > .multiselect() and .autocomplete() are jQuery functions. .autocomplete > works, the locality_autocomplete() function in the hubaddressbook > controller provides a list: ["Amsterdam", "Rotterdam", "Utrecht"] > which is alright for the jQuery UI autocomplete. > > .multiselect() needs this: > > <select id="word" name="word" multiple="multiple"> > <option value="1">Option 1</option> > <option value="2">Option 2</option> > <option value="3">Option 3</option> > <option value="4">Option 4</option> > <option value="5">Option 5</option> > </select > > See:http://www.erichynds.com/jquery/jquery-ui-multiselect-widget/ > > ... which is what list:reference provides, however, list:reference > needs a table and in my case the options are the fields of a multiple > fields table. > > I hope I provided sufficient information to help me solve the problem. > > Kind regards, > > Annet