Juan, I kind of understand what you suggested. OK, so I need to generate the html in controller and pass to view by XML().
I'm trying to get value for model.id in controller but I cannot do this same way on view (maybe because it's not dictionary object..?) Do you know how I can get the value ? def model(): models = db(db.Model.Category_ID==request.vars.category_name).select(db.Model.ALL) result ="<select>" for model in models: result += "<option value='" + model.id + "'" ...... return DIV(result) On Sep 21, 12:35 pm, juanduke <juan.fu...@gmail.com> wrote: > Hi Omi: > > I think, that you need a jQuery Loadhttp://api.jquery.com/load/ > something like > in the view: > jQuery.load( "url to echo function", {params, like category id, if > necesary}, '#jquery selector of second combo' ) > > In the echo function: > > validate that you get a valid category id > do a select with this categery id, and save result in some variable. > for each row of the result, iterate to create the <options>, inside a > <select> > return XML (html_string or SELECT with OPTION) > > firebug or similar in chrome, will help you analizing the echo response. > > HTH