Fry click event in parent window from popup

I can successfully fire the click event on a button in the parent window from a popup in FF and Chrome ... however, nothing happens in IE. Any ideas?

window.opener.document.getElementById(Client ID Of Button).click();
+3
source share
5 answers

I think in IE you should write: " self.opener"

I think the problem is in the window.open function that opened this popup, make sure there are no spaces in the page title and window name.

+1
source

it works in ff $(parent.document.getElementById('clientId')).trigger('click');

+1
source

, , , , .click, , , click.

, javascript, , , , , .

+1
window.opener.document.getElementById(Client ID Of Button).click();

"". . IE.

: opener.document.getElementById(Client ID Of Button).click();

+1

I would think that this would work, but note: elementID should be in quotation marks, and dom indicates that the event lives in onClick ()

window.opener.document.getElementById ("Button Client Identifier"). onClick ();

You can also use self.opener

or window.parent or self.parent

Hope these ideas help.

0
source

Source: https://habr.com/ru/post/1767175/


All Articles