I have a window(1) that has a button(1). If I click on the button, then another window(2) will appear. It also has a button(2). If I click on the button (2) then popup will appear. How can I close the window(2) if I press "OK" on the popup window? I am using javascript.
2 Answers
Read here about window management.
You cannot do it according the security assurance of browser, there are some action which doesn't allow to be managed directly via javascript without user interference.
Got this from here /stackoverflow/