我有以下代码:
$("#submit_financials").live('click', function(event){
event.preventDefault();
// using serialize here to pass the POST variables to the django view function
var serialized_data = $("#financials_filter_form").serialize()
$.post("/ajax/custom_filter/", serialized_data, function(response){
// create a graph
});
$.post("/ajax/force_download/", serialized_data, function(response){
alert('hello');
});
});
但是,当我执行此代码时,我会在图表之前得到响应“你好”。为什么会这样?我将如何改变这一点,以便我首先得到图表?