弹出页面的问题! http://www.csdn.net/develop/read_article.asp?id=21355http://www.csdn.net/Develop/read_article.asp?id=15113 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 不使用JAVASCRIPT的前提之下!而且使用window.open("url"),如何获取返回的值! 调用窗口function showProduct(){ var param1 = document.all.<%= tb_comm_code.ClientID %>.value; var param2 = encodeURI(document.all.<%= tb_comm_name.ClientID %>.value); var param3 = encodeURI(document.all.<%= tb_comm_factory.ClientID %>.value); var inArgs = new Array( param1, param2, param3 ); var dialogSettings = "Center:yes;Resizable:yes;DialogHeight:600px;DialogWidth:800px;Status:false"; var url = "ModuleForm\\EnterCommMgr\\EnterCommSelect.aspx?code=" + param1 + "&name=" + param2 + "&factory=" + param3; var inArgs = window.showModalDialog( url, inArgs, dialogSettings );//返回值 document.all.<%= tb_comm_code.ClientID %>.value = inArgs[0]; document.all.<%= tb_comm_name.ClientID %>.value = inArgs[1]; document.all.<%= lb_comm_name.ClientID %>.innerText = inArgs[1]; document.all.<%= tb_comm_factory.ClientID %>.value = inArgs[2]; document.all.<%= lb_comm_factory.ClientID %>.innerText = inArgs[2]; document.all.<%= lb_HickeyName.ClientID %>.innerText = inArgs[3]; document.all.<%= lb_comm_standard.ClientID %>.innerText = inArgs[4]; } 父页面:在Page_Load事件中button1.Attributes.Add("onclick", "window.open('getclass.aspx');return false;")打开的页面:在Page_Load事件中 button2.Attributes.Add("onclick", "parent.window.opener.Form1.txtHyfl.value=txtsText.value;window.close();")txtsText为打开页面中的一个TextboxForm1为父页面的FORM的名称,txtHyfl为父页面中的一个Textbox window.open("url")在弹出的页面中:window.returnvalue = 'sss'; 這個問題我有問過,可是我都調試不成功,給你看看:http://expert.csdn.net/Expert/topic/2853/2853379.xml?temp=.2226068如果你實現的話,可以告訴我嗎? 就是使用BUTTONCLICK事件进行弹出式页面处理,并返回一个值到服务器端控件! 在A页面中用JAVASCRIPT弹出B页面Response.Write("<script Language=JavaScript>");string url="B.aspx Response.Write("ChildWindow = window.open('"+url+"', '111', 'width=220,height=200,top=180,left=280,toolbar=no,status=yes,location=no,menubar=no,directories=no,scrollbars=no,resizable=no')");Response.Write("</script>");在B页面中用JAVASCRIPT回传参数Response.Write("<script Language=JavaScript>");Response.Write("window.opener.document.forms['newmessage'].elements['Return'].value ='"你要回传的STRING"';");Response.Write("window.close();");Response.Write("</script>");Return是A页面中的TEXTBOX 的ID,newmessage是A页面的form名 支持直接设定选定值,你检查下拉控件d的邦定是不是在page_load中的!page.ispostback中? 查询数据的问题 做了一个三层的电子商务网站 想测试下 access数据库取值只要汉字过滤英文及符号 服务器变慢了,如何设置IIS?关于应用程序池的设置 急!已装VS2005英文版,新装SQLSERVER2K5中文企业版后,VS可建模版丢失,怎么恢复 ? asp.net假死机怎么办理 教我编程 问一个ASPX超级郁闷的问题,会不会VS。NET那里出问题了啊,想哭啊。。。。 关于树形导航 发布网站还需要注意的问题? 最近.net版上倒分的现象越来越严重了 请问WebGrid.Net控件能链接传值么?
而且使用window.open("url"),如何获取返回的值!
function showProduct()
{
var param1 = document.all.<%= tb_comm_code.ClientID %>.value;
var param2 = encodeURI(document.all.<%= tb_comm_name.ClientID %>.value);
var param3 = encodeURI(document.all.<%= tb_comm_factory.ClientID %>.value);
var inArgs = new Array( param1, param2, param3 );
var dialogSettings = "Center:yes;Resizable:yes;DialogHeight:600px;DialogWidth:800px;Status:false";
var url = "ModuleForm\\EnterCommMgr\\EnterCommSelect.aspx?code=" + param1 + "&name=" + param2 + "&factory=" + param3;
var inArgs = window.showModalDialog( url, inArgs, dialogSettings );//返回值
document.all.<%= tb_comm_code.ClientID %>.value = inArgs[0];
document.all.<%= tb_comm_name.ClientID %>.value = inArgs[1];
document.all.<%= lb_comm_name.ClientID %>.innerText = inArgs[1];
document.all.<%= tb_comm_factory.ClientID %>.value = inArgs[2];
document.all.<%= lb_comm_factory.ClientID %>.innerText = inArgs[2];
document.all.<%= lb_HickeyName.ClientID %>.innerText = inArgs[3];
document.all.<%= lb_comm_standard.ClientID %>.innerText = inArgs[4];
}
button1.Attributes.Add("onclick", "window.open('getclass.aspx');return false;")
打开的页面:在Page_Load事件中
button2.Attributes.Add("onclick", "parent.window.opener.Form1.txtHyfl.value=txtsText.value;window.close();")
txtsText为打开页面中的一个Textbox
Form1为父页面的FORM的名称,txtHyfl为父页面中的一个Textbox
在弹出的页面中:
window.returnvalue = 'sss';
http://expert.csdn.net/Expert/topic/2853/2853379.xml?temp=.2226068
如果你實現的話,可以告訴我嗎?
在A页面中用JAVASCRIPT弹出B页面
Response.Write("<script Language=JavaScript>");
string url="B.aspx
Response.Write("ChildWindow = window.open('"+url+"', '111', 'width=220,height=200,top=180,left=280,toolbar=no,status=yes,location=no,menubar=no,directories=no,scrollbars=no,resizable=no')");
Response.Write("</script>");
在B页面中用JAVASCRIPT回传参数
Response.Write("<script Language=JavaScript>");
Response.Write("window.opener.document.forms['newmessage'].elements['Return'].value ='"你要回传的STRING"';");
Response.Write("window.close();");
Response.Write("</script>");Return是A页面中的TEXTBOX 的ID,newmessage是A页面的form名