I have a snippet like this.
if (window.opener != null) {
window.opener.reload();
}
When called, firebug shows,
TypeError: window.opener.reload is not a function
And Chrome console says,
Uncaught TypeError: Object [object global] has no method 'reload'
What could be wrong?
P.S: typeof window.opener
is "object"
.
I have a snippet like this.
if (window.opener != null) {
window.opener.reload();
}
When called, firebug shows,
TypeError: window.opener.reload is not a function
And Chrome console says,
Uncaught TypeError: Object [object global] has no method 'reload'
What could be wrong?
P.S: typeof window.opener
is "object"
.
-
What does
typeof window.opener.reload
show? – jacquard Commented Feb 6, 2014 at 11:46 - anyway, have a look at this link wich might be a workaround: stackoverflow./questions/4571860/… – Ricardo Appleton Commented Feb 6, 2014 at 11:48
- @RicardoAppleton: what has this got to do with jquery? – codeandcloud Commented Feb 6, 2014 at 11:49
1 Answer
Reset to default 6reload
is a method of the location
object, not the window
object.
window.opener.location.reload();