Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 567
  • Last Modified:

update text box on parent window from child window

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
royalcyber
Asked:
royalcyber
1 Solution
 
MacAnthonyCommented:
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
 
Computer101Commented:
Forced accept.

Computer101
EE Admin
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now