Javascript在新选项卡而不是窗口中打开

Javascript在新选项卡而不是窗口中打开,javascript,dialog,dynamics-crm-2015,Javascript,Dialog,Dynamics Crm 2015,我试图打开一个固定大小的新窗口,但它会在一个新选项卡中打开?我知道这是为什么,下面是我的代码 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

我试图打开一个固定大小的新窗口,但它会在一个新选项卡中打开?我知道这是为什么,下面是我的代码

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();
}
}`

我认为您必须为窗口提供一个参数(宽度/高度)

打开(url,windowName,“高度=400,宽度=200”)


在此处尝试:

您可能想看一看,这个问题以前被问过