Jquery打开一个没有响应的新选项卡

Alright so I am trying to open up a new tab from the jquery but I have few problems

  1. The code doesn't call the window.open
  2. I am trying to load the current path (localhost/bla/) and then open some file. But I havent found a way to do this yet, the only way I found is by using the static link (actually writing down the whole path manualy)
case "success_password": {
      alert("Welcome back. We hope that you will enjoy your stay!");
      window.open('localhost/game/map.php', '_blank');
      break;
}

Is there a way to do this without writing down the whole path? So I could just use for example path + "map.php";

I just replaced window.open('localhost/game/map.php', '_blank'); with window.location.replace("map.php"); and it worked like a charm!