Yea, sorry about that, the recipe is not quite right, you shouldn't be building the html manually. You should return a dict with the results... write up a small widget to display the options, and use a custom widget (they are called components now?). On Tuesday, October 8, 2013 6:29:03 AM UTC-7, Avi A wrote: > > Still stuck with that... > Thanks. > > On Saturday, October 5, 2013 5:29:37 PM UTC+3, Avi A wrote: >> >> def echo(): >> value = request.post_vars.f_item_category >> filtered_sub = db(db.t_sub_categories.f_category_id == >> value).select(db.t_sub_categories.ALL,orderby=db.t_sub_categories.f_sub_category_name, >> >> cache=(cache.ram,10),cacheable=True) >> filtered_sub = dict(filtered_sub = filtered_sub) >> select_header = "<select id='t_items_f_item_subcategory' >> class='generic-widget' name='f_item_subcategory'> \ >> <option value=''></option>" >> select_footer = '</select>' >> def select_body(): >> for f in filtered_sub: >> #return "<option value='f.id'>" + f.f_item_subcategory + >> "</option>" >> return 'test' >> return select_footer + select_body() + select_footer >> >> This will render 'test' just once(where expected more). >> I think the problem is that the filtered_sub = dict() from some reason. >> If I replace the return 'test' with: >> return "<option value='f.id'>" + f.f_item_subcategory + "</option>" >> It flashes an error. >> Thanks. >> >
-- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.