I’m opening a new window and assigning it an onload event like this:
var wconsole = window.open("console?cachebust=" + (new Date()).getTime(), "consolewin");
$(wconsole).load(function(){
// event code here
});
However, if I make the same call again (i.e. call window.open again with the same arguments), the load function is never called, even though the window is refreshed.
Any ideas why?
As I stated in my comment, if the window is already open, what do you expect it’s load function to do? It’s already loaded. Close the window and it loads the window again.
You can use the
window.closefunction to close the window and then open it again.