【发布时间】:2017-03-13 16:53:05
【问题描述】:
在让用户通过 AngularJS 表单提交信息后,我试图在新选项卡/页面中打开一个窗口。但是,Chrome 的弹出窗口阻止程序阻止了该操作。
这是我的$http 请求部分在我的app.js 中
// function to process the form
$scope.processForm = function() {
$http({
method : 'POST',
url : 'docusign.php', // PHP script generates URL from form data
data : $scope.user // pass in data as strings
})
.success(function(data) {
window.open(data); // this gets prevented by Chrome's popup blocker
//The root of the new page I'm trying to open is https://www.docusign.net
// -- Am I getting a pop-up block because I'm trying to take the user to a
// different website?
});
};
【问题讨论】:
标签: javascript angularjs