Refresh same page with ajax with different data
You can use jQuery, which gives you a very simple way to do that:
$.post( "yourpage.html", $('form').serialize() + "&ajax=true", function(response) {
    $('#results').html(response);
});
Server side, detect if ajax is true and then return only the query results instead of the whole page. They will be saved in the element of id="results". Replacing the whole page is generally not a good idea.
I have a web page with a form each time a form is submitted same page loads but with different data relevant to the query. On the back-end i am using python for finding data relevant to query.
I want to process all this with ajax as back-end process needs more time so i need to show status to the user i -e whats going on now in the system
Also the data returned is the same html file but with some other data. so how can i display it on the current page. It should not be appended to current html file. it is standalone
Anyone please give me a solution to this problem