我需要立即使用Pay来打开新标签页 如果点击指示打开新标签页的支付键按钮。
$(function() {
$("#OrderTable > tbody > tr > td> .paynow").click('click', function(Myevent) {
Myevent.preventDefault();
var urls = $(this).attr('href');
var passval = $(this).parents().siblings('td:eq(1)').text();
$.ajax({
type: "POST",
datatype: "json",
async: true,
url: '/MyAccount/PayNow?OrderId=' + passval,
contentType: "application/json; charset=utf-8",
success: function(RtObject) {
//alert(RtObject.isError);
//alert(RtObject.CId);
if (!RtObject.isError) {
//alert(RtObject.isError);
if (RtObject.CId == 1) {
var newwin;
if (newwin && !newwin.closed) {
newwin.focus();
} else {
window.location.href = RtObject.ReturnVal;
}
} else if (RtObject.CId == -1) {
jAlert(RtObject.Message, "Failure");
}
}
},
failure: function(response) {
jAlert("Cant go to payment process", "Failure");
}
});
});
我需要打开新标签。请解决此问题。