Solved

update  text box on parent window from child window

Posted on 2007-11-20
3
553 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

This article discusses how to create an extensible mechanism for linked drop downs.
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…

760 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now