2015-10-02 4 views
1

im пытается открыть новое окно с фиксированным размером, но вместо этого открывается на новой вкладке? Я уверен, почему это так, вот мой код ниже.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

ответ

Смежные вопросы