jQuery 弹窗 后 内嵌树和iframe 取值问题
//添加图纸1
function openSelectSort() {
var status = $("#status").val();
if(status==0||status==3){
$.dialog.setting.zIndex = getzIndex();
$.dialog({content: 'url:dzDataFileController.do?draw_list&drawid=${drawid}&add_lx=1', zIndex: getzIndex(), title: '文件列表', lock: true, width: '980px', height: '500px', opacity: 0.4, button: [
{name: '确定', callback: callbackRealNameSelect, focus: true},
{name: '取消', callback: function (){}}
]}).zindex();
}else if(status==1){
alert("审批中,不允许添加图纸");
}else if(status==2){
alert("审批已通过,不允许添加图纸");
}
}
function callbackRealNameSelect() {
var iframe = this.iframe.contentWindow;
alert(iframe.$("#xyzabc").val());
//alert($(iframe.$("#listFrame").contents()).find("#abcdefg").val());
alert(iframe.$("#listFrame")[0].contentWindow.$("#abcdefg").val());
//$('iframe').contents().find('#tableID').datagrid('options');
//$("#iframe")[0].contentWindow.$('#tableID').datagrid('getColumnFields');
alert("1234");
var ids = [];
//var rows = $(iframe.$("#listFrame").contents()).find("#checkDrawListBaijinshan").datagrid('getSelections');
var rows = iframe.$("#listFrame")[0].contentWindow.$("#checkDrawListBaijinshan").datagrid('getSelections');
alert(rows.length);
if (rows.length > 0) {
for ( var i = 0; i < rows.length; i++) {
ids.push(rows[i].id);
}
var daids = ids.join(',');
alert(daids);
}
}