javascript - How to load a dynamic webpage content in a new tab -
i'm working on backbone js application in i've got load dynamic data in new tab, loading in same page. existing thing backbone use app.navigate() method #same page.
i tried using window.open(), , wrote method onload() of this.
var newwindow = window.open(openurl+"#catalog2/"+gentimestamp(), '_blank'); newwindow.onload = function() { app.navigate("/catalog2/"+gentimestamp(), false); };
but script loading / applying on parent window, instead of newly opened window, result of which, new page not loading properly. appreciated.
backbone works single page application.
once open new window it's, definition, no longer single page application, , routes or history object not applicable other window, since each window has own history.
instead use old newwindow.location.assign(url)
Comments
Post a Comment