1👍
You can send and receive your own XMLHttpRequest, but it is too much of works to do and IE will create a lot of problems.
Have you ever heard about jQuery? I strongly recommend you take a look at it and learn how to send and receive Ajax request using it.
1👍
You need to make an AJAX call back to the server with the user’s actions, and process it on the server. You probably want a different view to process the AJAX request — you could do it with the same view, but it would be somewhat silly to. The response from that view contains data (probably as JSON) or HTML, which you display on the page with javascript. Check out jquery — it’s great for the client side.
- [Answered ]-Django Cross Table Querysets
- [Answered ]-What is StringIO() used for in this script?
- [Answered ]-Django model formset performance
- [Answered ]-Putting a click event for a dialogue box with Django Tables2
0👍
You could accomplish this with plain Javascript and AJAX. When the user clicks on a link, use XMLHttpRequest to call view.py to process the queries.
eg. For the link: <a href="#" onclick=submitdb(); >Click me!</a>
For a tutorial on implementing AJAX (XMLHttpRequest) with Javascript, have a look here:
- [Answered ]-The django + nginx can't load staticfiles
- [Answered ]-Django Formset.save() didn't save model
- [Answered ]-How can I detect when a Django server is started without a settings module?
- [Answered ]-Django update a row