2015-10-02 67 views
1

即時通訊設法打開一個固定大小的新窗口,而是它打開了一個新的標籤?我確定這是爲什麼,這是我的代碼如下。Javascript在新標籤中打開不是窗口

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

你可能想看看[http://stackoverflow.com/questions/726761/javascript-open-in-a-new-window-not-tab]( http://stackoverflow.com/questions/726761/javascript-open-in-a-new-window-not-tab),這個問題已被問及之前 – neilsimp1

回答

相關問題