質問

I'm running this code to try to make a page reload after I closed the current one (that edits values from the one thats supposed to reload):

setTimeout( function() {
            window.opener.$('window').('reload');
        window.close();trigger
    }, 1700);

And I get this error every time:


XML filter is applied to non-XML value ({length:0, prevObject:{0:({}), context:({}), length:1}, context:({}), selector:"window"})

I really don't understand anything about XML and I don't even understand whats wrong...


役に立ちましたか?

解決

Your syntax is incorrect. You're trying to reference a property of window.opener which is equivalent to the jQuery object. Remove the references to the jQuery methods, as that just provides an alternative technique for selecting the current window, and is irrelevant here.

setTimeout( function() {
    window.opener.location.reload();
    window.close();
}, 1700);
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top