I have a page with two buttons, one Button opens a popup window with the next function:
function MM_openBrWindow(theURL,winName,features) { //v2.0
my_window=window.open(theURL,winName,features);
}
and I need to detect from that window (my_window) when the second button in the parent page is clicked and raise an alert.
How can I do that?
You would do
my_window.alert("hey")in the click event for the second button in the parent window. If you want to access the parent window from the child window (to add an event, for example), usewindow.openerin the child window.If you want to define the event from within the child window: