Solved

update  text box on parent window from child window

Posted on 2007-11-20
3
556 Views
Last Modified: 2013-11-12
there is a parent window with a text box and when u click on a update  button it open another window where you can
modify the text ; the problem is when the text gets modified the text box on the parent window does not get updated; the parent window page has to be refreshed in order for the text to get updated

what is the bext way to update the text on the parent screen

thanks for all your help!!!!!!!!!!!!!!!!!!!!!!!!!!


0
Comment
Question by:royalcyber
3 Comments
 
LVL 11

Accepted Solution

by:
MacAnthony earned 500 total points
ID: 20321052
Give the element on the parent window a unique id something like <input type="text" id="parentTextBox" />

Then from the child window do something like:
window.opener.document.getElementById('parentTextBox').value = 'Some Text';

For that to work, the parent window needs to have called window.open to create the child window, I believe.

Hope that gets you in the right direction.
0
 
LVL 1

Expert Comment

by:Computer101
ID: 20560340
Forced accept.

Computer101
EE Admin
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question