博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Pass value from child popup window to parent page window using JavaScript--reference
阅读量:6656 次
发布时间:2019-06-25

本文共 1578 字,大约阅读时间需要 5 分钟。

Here Mudassar Ahmed Khan has explained how to pass value from child popup window to parent page window using JavaScript.

The child popup window must be opened using JavaScript window.open function. And in such case we can access the parent page controls using JavaScript window.opener instance.

In this article I will explain how to pass value from child popup window to parent page window using JavaScript.
The child popup window must be opened using JavaScript 
window.open function. And in such case we can access the parent page controls using JavaScript 
window.opener instance.
 
Parent Page
Inside the Parent Page I have placed a TextBox which is read-only and a button to open the child popup window using the 
SelectNameJavaScript function.
Name: 
Popup Child Window Page
The Popup Child Window Page has a DropDownList to choose the name of the person and a button which when clicked calls the 
SetNameJavaScript function.
This function uses the reference of 
window.opener property and finds the 
Parent Page txtName TextBox using 
document.getElementById method of JavaScript and sets the value selected through the DropDownList to it.
In similar way you can access other controls too of the Parent Page from the Child Popup Window Page

Pass value from child popup window to parent page window using JavaScript

 
Demo
refernce:
http://www.aspsnippets.com/Articles/Pass-value-from-child-popup-window-to-parent-page-window-using-JavaScript.aspx

转载地址:http://wzxto.baihongyu.com/

你可能感兴趣的文章
iOS开发 -- 为本地文件添加自定义属性的工具类
查看>>
Spring AOP --JDK动态代理方式
查看>>
AJPFX总结在循环中break与continue的区别
查看>>
高并发下,解决Mysql 多sleep进程
查看>>
tomcat的servlet-api.jar
查看>>
快学scala(第二版)学习笔记-1.基础
查看>>
jQuery 插件开发实例(一)
查看>>
网站三种访问方式
查看>>
vbs定时关机任务脚本
查看>>
javascript-函数和定时器
查看>>
jmeter逻辑控制器说明
查看>>
jxl下拉长度的问题,Validation list exceeds maximum number of characters - truncating
查看>>
ubuntu下open***搭建
查看>>
如何优化100s的Elasticsearch 查询到1s以内
查看>>
MongoDB Hello World
查看>>
我的友情链接
查看>>
感谢母亲
查看>>
用面向对象思想实现时钟C++描述
查看>>
优秀网页设计:图标在网页设计中应用的20佳案例
查看>>
linux07-进程与系统引导
查看>>