looks like <script>
tag for test.js
is missing in test.html
<head>
<title></title>
<link href="/pages/settings/test/test.css" rel="stylesheet" />
<script src="/pages/settings/test/test.js"></script>
</head>
regards comments. html has missing id
attributes for those elements. hence, getElementById
is failing. Having said that document.getElementById()
is not necessarily the best way to achieve that. consider using class
attribute in html and element.querySelector('.myclass')
which scopes the query to the root element for the page; also scope of collision of ids across pages is removed.
<div id="test"
data-win-control="WinJS.UI.SettingsFlyout" data-win- options="{settingsCommandId:'test', width:'narrow'}">
<div class="win-header">
<div class="win-label">test</div>
</div>
<div class="win-content">
First Name: <input id="firstname" />
<br />
<input id='submit' type="submit" value="Save"