警告信息如下:
if (allInputValid) {
var bC = parseInt(document.getElementById("BCutId").value);
if(bC>0){
$.ajax({
url: BrowserSide.Url.getFullUrl('C/Edit'),
type: 'Post',
data: $(CForm).serialize(),
success: function (result) {
$('#CId').val(result.cId);
if (result.type == "created") {
BrowserSide.C.PopupMsg("created successfully!!");
}
else {
BrowserSide.C.PopupMsg("modified successfully!!");
}
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
BrowserSide.AjaxLog.HandleAjaxCallFail(XMLHttpRequest, textStatus, errorThrown, "ajax error in in C.js clickSubmitBt");
}
});
} else {
BrowerSide.C.PopupMsg("Please select bC!");
}
}
return false;
但是,警报标准化为在屏幕中弹出中心。我希望弹出/警告弹出屏幕左侧的中心。我怎么做?
我正在使用ASP.NET MVC 4
编辑:
我有这个功能,它应该改变窗口显示在左边但它仍然显示为居中。为什么?
PopupMsg: function (msg) {
var browser = BrowserSide.BrowserCompatibility.GetBrowser();
if (browser.toLowerCase().indexOf("explorer") != -1) {
//alert(msg);
$("#CasePopupDialog").html(msg);
$("#CasePopupDialog").dialog(
{
dialogClass: "no-close",
modal: true,
title: 'Message Window',
//show: 'slide',
//hide: 'slide',
width: '315px',
height: 'auto',
//resizable: true,
closeOnEscape: true,
focus: true,
position: ['left',100],
buttons: {
Ok: function () {
$("#CasePopupDialog").html("");
$(this).dialog("close");
}
},
});
} else {
alert(msg);
}
},