自定一个dialog,在子窗体中写一个方法,然后通过iframe进行调取
function createwindowoktext(title, addurl,width,height,oktext,canceltext) {
width = width?width:700;
height = height?height:400;
if(width=="100%" || height=="100%")

{ width = window.top.document.body.offsetWidth; height =window.top.document.body.offsetHeight-100; }

if(typeof(windowapi) == 'undefined'){
$.dialog({
content: 'url:'+addurl,
lock : true,
//zIndex:1990,
width:width,
height:height,
title:title,
opacity : 0.3,
cache:false,
ok: function()

{ iframe = this.iframe.contentWindow;

var orgIds=iframe.getDomianIds();

var orgNames = iframe.getDomian(); //alert(orgId);

$("input[name='domainIdStr']").attr("value",orgIds);

$("input[name='domainStrs']").attr("value",orgNames);

//saveObj();

return true; }

,
okVal:oktext,
cancelVal: canceltext,
cancel: true /为true等价于function(){}/
}).zindex();
}else{
W.$.dialog({
content: 'url:'+addurl,
lock : true,
width:width,
//zIndex:1990,
height:height,
parent:windowapi,
title:title,
opacity : 0.3,
cache:false,
ok: function()

{ iframe = this.iframe.contentWindow; var orgIds=iframe.getDomianIds(); var orgNames = iframe.getDomian(); //alert(orgId); $("input[name='domainIdStr']").attr("value",orgIds); $("input[name='domainStrs']").attr("value",orgNames); //saveObj(); return true; }

,
okVal:oktext,
cancelVal: canceltext,
cancel: true /为true等价于function(){}/
}).zindex();
}

}

相关文章:

  • 2022-12-23
  • 2021-10-10
  • 2021-08-15
  • 2018-08-08
  • 2022-12-23
  • 2022-12-23
  • 2022-01-09
  • 2021-08-17
猜你喜欢
  • 2022-12-23
  • 2020-10-25
  • 2021-09-02
  • 2022-12-23
  • 2021-10-31
  • 2021-08-18
  • 2022-02-09
相关资源
相似解决方案