I am trying to partial load a page with jquery.
I don’t understand why row.load() always sends a request.POST when I click on the link, where it should really have sent a request.GET. Is there anything I have overlooked?
html:
<a class="row_edit" href="/sales_item/edit/{{ item.id }}" title="{% trans 'Edit' %}"><i class="icon-pencil"> </i></a>
javascript:
$(document).ready(function () {
$(".row_edit").click(row_edit);
});
function row_edit() {
// e.g. url = '/sales_item/edit/8'
var url = $(this).attr("href");
var row = $(this).closest('tr')
row.load(
url + "/",
null,
function () {
$("#save-form").submit(row_save);
}
);
return false;
}
From the .load() docs:
Just omit the
nullarg.