我正在尝试使用dhtmlx popup
并根据要求
即使单击外部弹出区域,弹出窗口也应保持原位
。在这种情况下使用onBeforeHide
事件但它没有触发。
请帮助!!我正在使用dhtmlx版本3.6。
此致 Shalini Mathur
答案 0 :(得分:0)
function sdrComment(sdrButton){
var vParentOrder = null;
var row_id = myGrid.getSelectedId();
if( (row_id == "") || (row_id == null)) {
alert("Please select an order");
return;
}
vParentOrder = myGrid.cellById(row_id, 0).getValue();
var url = "/XMII/Illuminator?QueryTemplate=NC/sqlSDRCommentsForOrder&Param.1=" + vParentOrder + "&Content-Type=text/json";
var returnData = callAjaxReturn(url);
var sdrComments;
sdrComments = returnData.Rowsets.Rowset [0].Row [0].sdrComments;
if((sdrComments == "") || (sdrComments == null)){
alert("No SDR comment exists for selected order");
}
else{
var myPop;
var myForm;
var formData;
formData = [{
type: "block",
style: "margin: 10px 10px 10px 10px;",
list: [
{type: "settings",inputWidth: 300,inputHeight: 300},
{type: "input",name: "memo",value: sdrComments,rows: 3,readonly: true},
{type: "button", value: "OK"}]
}];
var flag_hide = 0;
myPop = new dhtmlXPopup({ id: "popforsdr" });
myPop.attachEvent("onShow", function(){
if (myForm == null) {
myForm = myPop.attachForm(formData);
myForm.setFontSize("19px");
myForm.attachEvent("onButtonClick", function(){
myPop.hide();
flag_hide = 1;
Permissions(true);
selectable = true;
});
}
});
myPop.attachEvent("onBeforeHide", function(){
//alert("Hide");
return false;
/* if(flag_hide == 0){
myPop.show();
}
else{
myPop.hide();
flag_hide = 0;
}
*/
});
var x = getAbsoluteLeft(sdrButton);
var y = getAbsoluteTop(sdrButton);
var w = sdrButton.offsetWidth;
var h = sdrButton.offsetHeight;
myPop.show(x, y, w, h);
Permissions(false);
selectable = false;
}
}
答案 1 :(得分:0)
您好请查找参考码,
myPop.attachEvent("onBeforeHide", function(){
return false;
});
在这一行中,我试图让popup留下来。