Javascript 在新标签页中打开而不是 window

Javascript open in new tab not window

我正在尝试打开一个固定大小的新 window,但它却在新标签页中打开?我确定这是为什么,下面是我的代码。

function opendialog() {

// If on a create form then save and reload so the dialog can open
if(Xrm.Page.ui.getFormType() == 1)
{
    Xrm.Page.data.entity.save(null);
    return;
}

// If sale appointment then trigger dialog
if (Xrm.Page.getAttribute("new_PhoneCallMade").getValue() == true) {

    window.open("/" + Xrm.Page.context.getOrgUniqueName() + "/cs/dialog/rundialog.aspx?DialogId=%1111111111111111111%7d&EntityName=appointment&ObjectId=" + Xrm.Page.data.entity.getId());
    window.resize(500,500);

    // Set as being displayed so it doesn't trigger again on load
    Xrm.Page.getAttribute("new_PhoneCallMade").setValue(true);

}
}

function opendialogonload() {

if (Xrm.Page.getAttribute("new_PhoneCallMade").getValue() == null
  || Xrm.Page.getAttribute("new_PhoneCallMade").getValue() == false) {
    opendialog();
}
}`

我认为你必须给 window (width/height) 一个参数。

window.open(url, window姓名, "height = 400, width = 200");

在这里试试:http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_win_open2