passing data b/w parent and child windows

Results 1 to 2 of 2

Thread: passing data b/w parent and child windows

  1. #1
    Join Date
    Dec 1969

    Default passing data b/w parent and child windows

    I have this submit button (on an asp page) that when clicked, opens a pop-up window executing another asp page. After execution of this asp page (pop-up), I have a message for the user and a "Close" button to close the pop-up. What should happen is when the user closes the pop-up, the submit button on the parent page should turn into a "Done" button. <BR><BR>Here&#039;s my code:<BR><BR>if (theForm.elements["button" + RecNum].value == "submit"){<BR>var response = confirm("Are you sure you want to make changes to ** " + userName + "&#039;s ** record?")<BR>if (response == true){<BR>var newWindow =;EUSBCUserAdminApprov.asp?&#039;) <BR>//this part i need help<BR>//if window is closed, then do these<BR>theForm.elements["button" + RecNum].value = "DONE"<BR>theForm.elements["button" + RecNum].disabled = true<BR>}<BR><BR>Would appreciate any help you can give.

  2. #2
    Join Date
    Dec 1969

    Default Not sure where the code you show is...

    but in any case, the basics are:<BR><BR>(1) The parent can refer to the popup thus:<BR><BR>popup = .... ); // remember ref to popped up window<BR>popup.document.FormName.FieldName.value = "whatever";<BR><BR>(2) The popup can refer to the parent thus:<BR><BR>// use the "opener" property:<BR>opener.document.ParentFormName.FieldN ame.value = "something";<BR><BR><BR>See and the JavaScript FAQs for lots more on this and other JS questions.<BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts