js new Open window vaule send and receive get Problem
来源:互联网 发布:腾讯视频 mac 旧版本 编辑:程序博客网 时间:2024/05/16 06:15
<script>
function OpentryCustomer()
{
var Txttry = "<%= Txttry.ClientID %>";
var Hitry = "<%= Hitry.ClientID %>";
var Apppath = "http://localhost:58945/WebSite1/"
var url = Apppath+"CustomerDialog.aspx?Userid="+Hitry+"&UserName="+Txttry+"";
alert(url);
window.open(url,'newwindows1','height=1000, width=700, top=10, left=10, toolbar=no, menubar=no, scrollbars=yes, resizable=yes,location=no, status=no');
}
</script>
<div>
<asp:Button ID="BtnSearch" runat="server" Text="SearchTry" OnClientClick="OpentryCustomer()" />
<asp:Button ID="btnReSelectCustomer_Main" runat="server" CausesValidation="False" Visible="false"/>
<asp:TextBox ID="Txttry" runat="server" Text="" />
<asp:HiddenField ID="Hitry" runat="server" />
</div>
另一个页面,
<script>
/* request类 */
function request(strParame) {
var args = new Object( );
var query = location.search.substring(1);
var pairs = query.split("&"); // Break at ampersand
for(var i = 0; i < pairs.length; i++) {
var pos = pairs[i].indexOf('=');
if (pos == -1) continue;
var argname = pairs[i].substring(0,pos);
var value = pairs[i].substring(pos+1);
value = decodeURIComponent(value);
args[argname] = value;
}
return args[strParame];
}
</script>
<script>
function SelectCustomer()
{
var userid = request('Userid');
alert(userid);
var username= request('UserName');
alert(username);
var customerID=document.getElementById("<%= TxtName.ClientID %>").value;
alert(customerID);
var customerName=document.getElementById("<%= TxtID.ClientID %>").value;
alert(customerName);
if(window.opener!=null)
{
var id = window.opener.document.getElementById(userid);
alert(id);
if(id!=null)
{
id.value = customerID;
}
var customerNamCtrl = window.opener.document.getElementById(username);
alert(customerNamCtrl);
if(customerNamCtrl!=null)
{
customerNamCtrl.value = customerName;
}
window.close();
}
return false;
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Button ID="Btn" runat="server" OnClientClick="SelectCustomer()" />
<asp:TextBox ID="TxtName" runat="server" Text="shabi"/>
<asp:TextBox ID="TxtID" runat="server" Text="shamao" />
</div>
- js new Open window vaule send and receive get Problem
- JS: window.open and window.showModelessDialog
- TCP之(send and receive information)
- send,receive
- Send and Receive JSON between Android and PHP Web Service
- PDU maxsize receive and send DVT trace blog
- snmp v3 trap(send and receive use net-snmp)
- window.showModalDialog() and window.open()
- window.open(js)
- JS window.open()属性
- js window.open()属性
- js window.open
- JS about window.open();
- JS window.open()属性
- JS window.open
- JS window.open
- JS window.open()用法
- JS window.open()属性
- jQuery-对Select的操作集合[终结篇]
- JAVA访问控制符和动态绑定
- document.execcommand方法
- poj1504
- 魔鬼藏在细节中
- js new Open window vaule send and receive get Problem
- Apache目录明细
- 2010年12月:Top Smartphone Platforms share in U.S.
- 要写的几篇稿子
- 三岁看大,不是吹牛
- 从一套商业软件的pj过程看编程方式对pbd...
- 再谈powerbuilder程序防止破解的办法
- PB技巧总结
- PB调用Oracle 存储过程的样列