In this post my problem was almost solved, I am left with an args
problem.

I am using the jQuery UI autocomplete. In the controller I have this
function:

def locality_args_autocomplete():
 
rows=db((db.NodeKeyword.word==request.args(0))&(db.NodeKeyword.nodeID==db.Address.nodeID)&
\
    (db.Address.locality.like(request.vars.term+'%')))\
    
.select(db.Address.locality,distinct=True,orderby=db.Address.locality).as_list()
    result=[r['locality']for r in rows]
    return response.json(result)


... as the source of this jQuery function in the view:

$(function() {
  $("#no_table_locality_args").autocomplete({
    source:
"{{=URL('hubaddressbook','locality_args_autocomplete',args='javascript:
$(select#no_table_word).val();')}}",
    minLength: 2
  });


This doesn't work. #no_table_word references the id of a multiselect
field, which I would like to pass to the function creating the result
list for the autocomplete. Is there a way to get this to work?


Kind regards,

Annet.


Reply via email to