【发布时间】:2020-12-04 12:58:04
【问题描述】:
我想将响应数据传递到ajax成功的另一个页面。
我在 laravel 中使用 jquery。我已经调用了该函数并在成功调用中从控制器获取数据。我想将接收到的数据传递给另一个页面详细信息
$.ajax({
type: 'get',
url: 'am_detailed_report', //send the request to the controller
data: {
am_geo_selection: am_geo_selection
},
dataType: 'json',
success: function(data) {
console.log(data);
$url = "am_detailed?filter=" + data;
window.open($url, "_blank"); //want to send the parameter in post instead of passing it in url.
$('.loaderImage').hide();
},
error: function(jqXHR, textStatus, errorThrown) {
$('.loaderImage').hide();
}
});
【问题讨论】:
-
为什么需要这种行为?看起来您将使用过滤器显示一些详细信息,GET 应该适合此
标签: javascript jquery ajax