您的位置:首页 > 其它

弹出对话框,点击确定关闭对话框,返回值给父页面

2010-09-16 11:04 253 查看
父页面:





<input id="btnSelect" type="button" value="..." onclick="organTree('txt_GLJG','hid_gljg');" class ="btn" />





<script type="text/javascript" language="javascript">

function organTree(para,para1)

{

var orgid=document.getElementById('lblOrgid').value ;

var iTop = Math.ceil((window.screen.height-300)/2);

var iLeft =Math.ceil((window.screen.width-500)/2);

window.open("OrgList.aspx?pid="+para+"&pid1="+para1+"&orgid="+orgid,"", "height=300, width=500,top="+iTop+",left="+iLeft+"");

}

</script>



子页面:



protected void btnOK_Click(object sender, EventArgs e)

{

Response.Write("<script> window.opener.document.getElementById('txt_GLJG').value='" + this.treeInstitution.SelectedNode.Text + "';window.opener.document.getElementById('hid_gljg').value='" + this.treeInstitution.SelectedNode.Value + "'; window.close(); </script>");

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐