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

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:

  <link rel="stylesheet" href="../dist/css/framework7.min.css">
  <link rel="stylesheet" href="css/app.css">
  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>


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){
    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://... ';