[web2py] Re: Selecting from dropdown using Ajax

2010-11-10 Thread oneroler
Alex, Thanks for all your help. Yes, you were correct that the issue was simply that the id value was not being passed in the ajax call. Here is my final code for reference if anyone is interested. default.py def test(): firms = db(db.firm).select() return dict(firms=firms) def

[web2py] Re: Selecting from dropdown using Ajax

2010-11-09 Thread oneroler
Alex, Thanks. I thought based on the book that the 2nd argument of ajax was passing the values to request.vars.variable. I pasted some of the code from the book below for reference (http://web2py.com/book/default/ chapter/10?search=ajax#The-ajax-Function). Based on this I originally had the

[web2py] Re: Selecting from dropdown using Ajax

2010-11-09 Thread Alex
You are definitely correct. I mis-read what you had, but what I put up, you can still use as well if you need to pass args via the URL. In any case, if I am understanding this correctly, it seems to be more of a problem of getting the selected value of the option, correct? There are probably

[web2py] Re: Selecting from dropdown using Ajax

2010-11-08 Thread Alex
How are you passing the value in the request.vars? I'm going to guess that on your AJAX call in the _onChange handler, you want to specify the parameters. You can do something like: - ajax( '{{=URL(c='controllerName',f='test_chg', args=request.args(0))}}', ['firmdrop'],'target' ) You can