Windows in the app URL

I created a DataTable with many items. When onItemDblClick, open the window. I created windows using this tutorial Popups and Windows - Webix Jet . When I open the window, url looks like /main/users?id=334/user . If I close/hide the window, it will not open again. How to fix it?

need to change URL to /main/users when I close the window or find another way to open the window

https://snippet.webix.com/goj2zjct

Who can help me?

Im use window.location.href - https://snippet.webix.com/nkwv19t4 . Its right?

do not know if this is a hack but works

{
    view: "button",
    value:"Close",
    width: 100,
    click: () => {
        this.getParentView().show("");//parent view here is UsersView
    }
}

https://snippet.webix.com/hh4vac1g

so easy… Thanks!

USE:

window.location.replace('http://example.com');

It’s better than using window.location.href = ‘http://example.com’;

Using replace() is better because it does not keep the originating page in the session history, meaning the user won’t get stuck in a never-ending back-button fiasco.

  • If you want to simulate someone clicking on a link, use window.location.href
  • If you want to simulate an HTTP redirect, use window.location.replace

You can use assign() and replace methods also to javascript redirect to other pages like the following:

location.assign("http://example.com");

The difference between replace() method and assign() method(), is that replace() removes the URL of the current document from the document history, means it is not possible to use the “back” button to navigate back to the original document. So Use the assign() method if you want to load a new document, andwant to give the option to navigate back to the original document.