[Answered ]-Process a query without changing the page


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.


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.



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:


Leave a comment