[solved] V2 after server login jump to the main page

Hello!
I made a check of login and password on the server. Works fine, but can’t get jump to the main page after success. What’s trouble?

(the application works in a web browser)
used login.php:

<?php
session_start();
?>
<html>
<head>
  <link rel="stylesheet" href="../dist/css/framework7.min.css">
  <link rel="stylesheet" href="css/app.css">
</head>
<body>
  ...
  my login screen html code
  ...
<script src="../dist/js/framework7.min.js"></script>
<script src="js/routes.js"></script>
<script src="js/login.js"></script>

</body>
</html>

with login.js:

var app  = new Framework7();
var $$ = Dom7;

$$('#login-button').on('click', function (){
  app.request.post('user_login.php', { login: $$('#login').val(), password: $$('#password').val() }, function (data){
    app.dialog.alert(data);
    if (data=='Authorization ok!') {
         app.router.navigate('/');            // ??
    }
  });
});

in routes.js

...
  {
    path: '/',
    url: './index.php',
  },
...
1 Like

…mean, i want jump to anypage in the web… how to do external link in js code?

I found !

document.location.href = 'https://... ';