tags:

views:

113

answers:

2

Hi,

My requirement is as follows on click of a begin button a popup window opens up and begin button gets disabled. now when the user clicks the "done" button present on the child window the "begin" button on the parent window should get enabled.

+1  A: 

Use window.opener to get the parent window, and find the element using document.getElementById.

window.opener.document.getElementById("yourbuttonid").disabled = false;
rahul
@OP: E.g.: `var button = window.opener.document.getElementById('idOfButton');` In the child window, `window.opener` references the `window` object of the parent window. That object has the `document` property that references the parent's document, which of course has `getElementById` and such.
T.J. Crowder
that works thanks
SaveMe
A: 

IN PARENT WINDOW DO:

  1. disable begin button
  2. open the childwindow

IN CHILD WINDOW DO:

<input type="submit" value="done" onclick="window.opener.document.getElementById('begin').disabled = false;">
Marco Demajo