Hi, I can successfully fire a click event in a button on a 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();
Hi, I can successfully fire a click event in a button on a 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();
I think in IE you should write: "self.opener
"
I guess the problem is in the window.open function which opened this popup, make sure that there are no spaces in the page name and window name.
I would think that would work but note: the elementID should be in quotes and the dom specifies that the event lives in onClick()
window.opener.document.getElementById("Client ID Of Button").onClick();
You could also use self.opener
or window.parent or self.parent
Hopefully these Ideas help
this works in FF $(parent.document.getElementById('clientId')).trigger('click');
The standard answer here in normal GUI-based code is to say that if you have your .click event call a named method, and have all of your actual code inside that method, then it is much easier to have the external object call that named method than it is to have it try and fire a click event.
Don't know how well this applies to your javascript problem, as it's not my field, but as far as I'm concerned, unless you have a deep and deliberate need to actually have a button be pressed, it's far simpler to call a method.