I am a beginner in web2py. I've been looked around in this group about
the dedpendent drop down list, I found one person had the same
question with me, but I still don't understand about using
$.ajax(.....) where .... is the code sends to server and the drop down
list will be computed based on the selected value from the above drop
down list.

Let say I have the following tables

db.define_table('Country',
          Field('country_name', 'string'))

db.define_table('State',
          Field('state_name', 'string'),
          Field('country_name', db.country))

In the controller I have:
def index():
      form=SQLFORM(db.State)
      return dict(form=form)

What should i need to have in index.html to display the corresponding
state in country.
<script>
     $('#country_state').change(function(){ $.ajax( ........ ) }
</script>

please explain, and thank you in advance

Reply via email to