Ahoj, dle příkladu v učebnici mi nefunguje vycentrování okna po spuštění stránky, co je kde prosím blbě. děkuji
kod:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<script type="text/jaascript">
var window_height = 200;
var window_width= 200;
window.resizeTo(window_height, window_width);
var height= window.screen.availHeight;
var width = window.screen.availWidth;
var left_point= parseInt(width / 2) - parseInt(window_width / 2);
var top_point=parseInt(height / 2) - parseInt(window_height / 2);
window.moveTo(left_point, top_point);
</script>
</head>
<body>
<h1>Hi!</h1>
<script type="text/javascript">
var window= window.open("window.html", "window", "height=200, width=200" );
</script>
</body>
</html>