Tweaked HTML application to add warning message if scripts aren't loaded.
This commit is contained in:
parent
1207d89c33
commit
588d1a6b87
|
@ -27,6 +27,8 @@
|
|||
namespace app {
|
||||
|
||||
function initialize(): void {
|
||||
(document.getElementById("loading") as HTMLElement).style.display = "none";
|
||||
(document.getElementById("loaded") as HTMLElement).style.removeProperty("display");
|
||||
let elems = document.querySelectorAll("input[type=number], textarea");
|
||||
for (let el of elems) {
|
||||
if (el.id.indexOf("version-") != 0)
|
||||
|
|
|
@ -51,7 +51,12 @@
|
|||
|
||||
<body>
|
||||
<h1>QR Code generator demo library (JavaScript)</h1>
|
||||
<form action="#" method="get" onsubmit="return false;">
|
||||
<div id="loading">
|
||||
<p>Loading application...</p>
|
||||
<p>(Are the JavaScript files missing?)</p>
|
||||
<p>(The JavaScript code needs to be compiled from the TypeScript code.)</p>
|
||||
</div>
|
||||
<form id="loaded" style="display:none" action="#" method="get" onsubmit="return false;">
|
||||
<table class="noborder" style="width:100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
|
|
Loading…
Reference in New Issue