1

これは私のajaxリクエストです

 $.ajax({
        type: "POST",
        url: "Performance.aspx/GenerateMatrix",
        data: '{OrgId: ' + $('#hidOrgId').val() + ',SurveyFormId: ' + $('#divMatrixInfo .FeedbackForm').val() + ',GoalId: ' + $('#divMatrixInfo .FeedbackGoal').val() + ',StartDate: ' + "'" + StartDateTime + "'" + ',EndDate: ' + "'" + EndDateTime + "'" + ',EmployeeId: ' + "'" + $('#divMatrixInfo .FeedbackEmployee').val() + "'" + ',QuestionId: ' + "'" + $('#divMatrixInfo .FeedbackQuestion').val() + "'" + '}',
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        success: function (response) {
                        CloseModelOverLay('divMatrixInfo');
                        window.open('GenerateMatrix.aspx', '_blank');
                        $('#ddlPDPView').val('Goals');
                        $('#ddlPDPView').change();
        },
        failure: function (response) {
                        alert(response.d);
        }
      });

これでGenerateMatrix.aspxを開いて新しいタブで開きたい

window.open('GenerateMatrix.aspx', '_blank');

代わりに、新しいポップアップウィンドウで開きます。

4

1 に答える 1

2

これを試して:

var newWindow = window.open('http://www.example.com','_blank');

$.ajax({
    type: "POST",
    url: "Performance.aspx/GenerateMatrix",
    data: '{OrgId: ' + $('#hidOrgId').val() + ',SurveyFormId: ' + $('#divMatrixInfo .FeedbackForm').val() + ',GoalId: ' + $('#divMatrixInfo .FeedbackGoal').val() + ',StartDate: ' + "'" + StartDateTime + "'" + ',EndDate: ' + "'" + EndDateTime + "'" + ',EmployeeId: ' + "'" + $('#divMatrixInfo .FeedbackEmployee').val() + "'" + ',QuestionId: ' + "'" + $('#divMatrixInfo .FeedbackQuestion').val() + "'" + '}',
    contentType: "application/json; charset=utf-8",
    dataType: "json",
    success: function (response) {
                    CloseModelOverLay('divMatrixInfo');
                    newWindow.focus();
                    $('#ddlPDPView').val('Goals');
                    $('#ddlPDPView').change();
    },
    failure: function (response) {
                    alert(response.d);
    }
  });
于 2012-11-01T18:57:05.680 に答える