关于模态窗口的问题,希望各位高手帮忙!!!解决问题马上给分 在窗口中,用javascript打开模态窗口,在模态窗口中点击按钮,给父窗口的控件赋值(一共有6个个控件),用js怎么写啊? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 http://blog.csdn.net/tianzhenjing/archive/2006/11/22/1405435.aspx parent.document.all["TextBox1"].value="abc"; To:tianzhenjing(宁静夏天)我看了这个网址的资料,参照上面的说明写了代码,但是发现一个奇怪的问题,当模态窗口关闭的时候,赋给父窗体TextBox中的值都被清空了,不知道怎么回事...代码如下:打开窗体: window.showModalDialog("ModuleCategorySelect.aspx",window,"dialogWidth:550px;dialogHeight:580px;status:no;directories:yes;scrollbars:no;Resizable=no;");模态窗口给父窗体赋值: var id1 = window.document.getElementById("hidCategory1").value; var text1 = window.document.getElementById("txtCategory1").value; if(id1!= "" && text1!="") { window.dialogArguments.document.getElementById("hidCategory1").value=id1; window.dialogArguments.document.getElementById("txtCategory1").value=text1; } var id2 = window.document.getElementById("hidCategory2").value; var text2 = window.document.getElementById("txtCategory2").value; if(id2!="" && text2!="") { window.dialogArguments.document.getElementById("hidCategory2").value=id2; window.dialogArguments.document.getElementById("txtCategory2").value=text2; } var id3 = window.document.getElementById("hidCategory3").value; var text3 = window.document.getElementById("txtCategory3").value; if(id3!="" && text3!="") { window.dialogArguments.document.getElementById("hidCategory3").value=id3; window.dialogArguments.document.getElementById("txtCategory3").value=text3; } window.close(); 网页中怎样实现像 C# DataGridView 的功能?? |zyciis| 我的Cookies添加了域名已经怎么就读不到了呢,要怎么读,谢谢 总结:数据库设计多对多关系的几种形态(7种)。欢迎补充。 asp.net中,在IE中打开word、excel 转换XML字符串[简单问题] 菜鸟问一个问题,解决就给分 请问各位:[]有什么用? access中top ?怎么参数化 asp问题 在线等待:在事件中生成的WEB控件,如何在其他事件中引用它? 孟子、webdiyer、LoveCherry等高手请进!!!比较麻烦的问题 Request在什么命名空间下?
我看了这个网址的资料,参照上面的说明写了代码,但是发现一个奇怪的问题,当模态窗口关闭的时候,赋给父窗体TextBox中的值都被清空了,不知道怎么回事...
代码如下:打开窗体:
window.showModalDialog("ModuleCategorySelect.aspx",window,"dialogWidth:550px;dialogHeight:580px;status:no;directories:yes;scrollbars:no;Resizable=no;");模态窗口给父窗体赋值:
var id1 = window.document.getElementById("hidCategory1").value;
var text1 = window.document.getElementById("txtCategory1").value;
if(id1!= "" && text1!="")
{
window.dialogArguments.document.getElementById("hidCategory1").value=id1;
window.dialogArguments.document.getElementById("txtCategory1").value=text1; }
var id2 = window.document.getElementById("hidCategory2").value;
var text2 = window.document.getElementById("txtCategory2").value;
if(id2!="" && text2!="")
{
window.dialogArguments.document.getElementById("hidCategory2").value=id2;
window.dialogArguments.document.getElementById("txtCategory2").value=text2;
}
var id3 = window.document.getElementById("hidCategory3").value;
var text3 = window.document.getElementById("txtCategory3").value;
if(id3!="" && text3!="")
{
window.dialogArguments.document.getElementById("hidCategory3").value=id3;
window.dialogArguments.document.getElementById("txtCategory3").value=text3;
}
window.close();