Suppose I opened a popup from parent window I have calculated some calculation on child window while submitting the value from child window I need to close the child window and display the calculated value of child window to parent window textbox. Thanks in advance for any help, Subikar
On the first page it may looks something like var newWin = window.open("additional @param here"); PHP: On the second page function _closeWin(valueToBeParsed) { var parentWin = window.opener; // If you have a specific target element, specify it here var obj = document.getElementById("where"); parentWin.obj.value = valueToBeParsed; parentWin.focus(); this.window.close(); } PHP:
In child window you can use below code to assign value back to parent text box. window.opener.document.form.textbox.value='xxx'; self.close();