I made new project in Visual Studio 2015. It's JavaScript Windows App. I'm trying to make "Hello" application, but when i want compile it i get this error:
0x800a138f - JavaScript runtime error: Unable to set property 'onclick' of undefined or null reference
My code:
document.getElementById("button").onclick = function () {
var jmeno = document.getElementById("Jmeno").value
var pop = new Windows.UI.Popups.MessageDialog("<%=Ahoj.Clientid%>" + jmeno);
pop.showAsync()
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>App1</title>
<!-- WinJS references -->
<link href="WinJS/css/ui-dark.css" rel="stylesheet" />
<script src="WinJS/js/base.js"></script>
<script src="WinJS/js/ui.js></script>
<!-- App1 references -->
<link href="/css/default.css" rel="stylesheet" />
<script src="/js/default.js"></script>
<script src="js/zdravic.js"></script>
</head>
<body class="win-type-body">
<header>
<h1>Hello user! :)</h1>
</header>
<section>
<input id='Jmeno' type="text" placeholder="Zadej své jméno"/>
<button id="button">Klikni na mě!</button>
</section>
</body>
</html>
And for more, default.css doesn't work for me. Like it wouldn't be there. And yes, i have link it there.