I am new to using anything ajax related, so please excuse my ignorance.
I am working with the example here and trying to get it to work in the Django Admin. I am working on creating a custom change form for the model it will be used in.
The problem I am having is that after making the selection in the first selection box, nothing happens with the second box. I have tried using both prototype and jquery, but it seems that it doesn't get to either of them.
One thing I had to do to even get it to call the function in ajax.py, is I had to add quotes around the Dajax.process variable being passed within onchange.
I am currently just using the django dev server for testing purposes.
What am I missing?
So, there are several things you'll need to make work together in order to do this:
At minimum:
Possibly:
From there, you can use FireBug or Fiddler to make sure you're passing in, and getting back the right values from your Ajax call.
You'll also need to handle editing a record, where you'll need to fire an Ajax call to populate your dynamic form based on the existing value of the object.
Happy coding!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.