I think you need to get something simple working before you can make
progress.
I suggest you play around with something like this....
Paste this into controller/default.py
def test():
optlist = [OPTION(x) for x in ['A','B']]
testvar = SELECT(optlist, _id='idtest')
return dict(testvar=testvar)
def testoptions():
if request.vars.dpt == 'A':
return 'A requested'
elif request.vars.dpt == 'B':
return 'B requested'
else:
return request.vars
################################
Paste this into views/default/test.html:
{{extend 'layout.html'}}
<script>
jQuery(document).ready(function() {
$("#idtest").change(function() {
$("#idresult").load("{{=URL('testoptions')}}" +
"?dpt="+$("#idtest").val());
});
});
</script>
{{=testvar}}
{{=DIV(_id='idresult')}}
#########################
go to ..../default/test in your browser
--
---
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.