2π
β
use
$.get(url, [{key:value}], function(data){
//data is the entired contents of going to that url.
//split it up here and do your stuff
$('#div1').html(piece1);
$('#div2').html(piece2);
});
http://docs.jquery.com/Ajax/jQuery.get
edit: looking more closely at your question, you will need to also create a django template for the view which youβre calling with url
that will give all the information you want to the javascript function.
π€Brandon Henry
0π
I feel like a broken record by giving this answer, but you really want to check out the jQuery Taconite Plugin. It does what you asked for and 500% more. Checkout the examples and be amazed. I donβt use this word lightly, but this is a truly elegant solution.
π€Peter Rowell
Source:stackexchange.com