d另一种树形控件,dialog 另一种活用 用iframd的方式加载其他jsp

<td width="20%" nowrap class="zflrtdlabel">申 请 人</td>
  <td width="30%" align="left" class="zftdlabel">
  <input type="text" id="cxsqr" name="cxsqr" class="easyui-validatebox zfinput" onclick="selectUser(this.id,ShjkssConst.ORG_NAME_GJK);" validType="length[0,25]" readonly="readonly"/>
  <input type="hidden" name="cxsqrId" id="cxsqrId">
  </td>



<div id="orgUserDialog" style="padding:5px;display: none;">
<iframe src="" id="orgUserIframe" frameBorder="0" marginWidth="0" marginHeight="0" style="width:100%;height:100%;" ></iframe>
</div>



function selectUser(id,expandOrg) {
$('#orgUserDialog').dialog({
title:'选择用户',
    width:280,
    height:370,
buttons:[{
text:'确定',
iconCls:'icon-ok',
handler:function(){
var ids = window.frames['orgUserIframe'].window.getCheckedIds();
if(ids == ''){
$.messager.alert('提示','请选择用户!','warning');
}else{
$('#'+id).val(window.frames['orgUserIframe'].window.getCheckedNames());
$('#'+id+'Id').val(ids);
$('#orgUserDialog').dialog('close');
}
}
},{
text:'清空',
iconCls:'icon-cancel',
handler:function(){
$('#'+id).val('');
$('#'+id+'Id').val('');
$('#orgUserDialog').dialog('close');
}
},{
text:'关闭',
handler:function(){
$('#orgUserDialog').dialog('close');
}
}]
});
$('#orgUserIframe').attr('src','${ctx}/page/common/orgUserTree.jsp?isShowUser=true&isCheckbox=true&expandOrg='+encodeURI(expandOrg));
$('#orgUserDialog').dialog('open');
$('#orgUserDialog').panel('refresh');
}

猜你喜欢

转载自yuhuiblog6338999322098842.iteye.com/blog/2181341