问题描述
父窗体为一个frameset的窗体。而打开一个子窗体也是frameset的,无法把子窗体的值传到父窗体。。如果父窗体是普通页面还是可以传值回来的。请各位大虾帮忙呀。这个一个子窗体。传值到父窗体的JS代码。<scriptlanguage="JavaScript"type="text/javascript">varparent_window=parent.dialogArguments;functionclick_user(user_id,name){parent_window.form3.hdcb_id.value=user_id;parent_window.form3.txtcb_name.value=name;parent_window.form3.hdcb_name.value=name;}</script>//父窗体代码<%@PageLanguage="C#"AutoEventWireup="true"CodeFile="user.aspx.cs"Inherits="Select_user"%><!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><headrunat="server"><title>无标题页</title><scriptlanguage="javascript"type="text/javascript">//<!CDATA[functionButton1_onclick(){URL="Select/user_single.html";//frameset的窗体loc_y=loc_x=200;loc_x=document.body.scrollLeft+event.clientX-event.offsetX-100;loc_y=document.body.scrollTop+event.clientY-event.offsetY+170;window.showModalDialog(URL,parent,"edge:raised;scroll:1;status:0;help:0;resizable:1;dialogWidth:400px;dialogHeight:350px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px",true);//window.open(URL,true,"height=400,width=350,status=0,toolbar=no,menubar=no,location=no,scrollbars=yes,top="+loc_y+",left="+loc_x+",resizable=yes,modal=yes,dependent=yes,dialog=yes,minimizable=no");//这里设置了选人窗口的宽度和高度}//]]></script></head><body><formid="form1"runat="server"><asp:TextBoxID="txtcb_name"runat="server"Width="197px"ReadOnly="True"Enabled="false"></asp:TextBox><inputtype="hidden"name="hdcb_id"id="hdcb_id"value="123"runat="server"/><inputtype="hidden"name="hdcb_name"id="hdcb_name"value="123"runat="server"/><inputid="Button1"type="button"value="选择"onclick="returnButton1_onclick()"/></form></body></html>请各位大虾们一定要用测试哦!<framesetrows="*,30"rows="*"frameborder="NO"border="1"framespacing="0"id="bottom"><framesetcols="200,*"rows="*"frameborder="YES"border="1"framespacing="0"><framename="dept"src="dept.aspx"><framename="user"src="user.aspx"></frameset><framename="control"scrolling="no"src="control.aspx"></frameset>