Browse Source

move callback definition to JS file to make sure it is called when the JS code is loaded completely.

JSON-128^2
roker 1 year ago
parent
commit
045b7133f2
2 changed files with 4 additions and 3 deletions
  1. +0
    -3
      html/logview.html
  2. +4
    -0
      html/logview.js

+ 0
- 3
html/logview.html View File

@ -23,9 +23,6 @@
<table id="tbl" style="border:1px solid gray; border-collapse:collapse;"></table>
<script src="logview.js"></script>
<script>
document.getElementById('files').addEventListener('change', handleFileSelect, false);
</script>
</body>
</html>

+ 4
- 0
html/logview.js View File

@ -1,3 +1,5 @@
var lineRegEx = /(\d\d\d\d-\d\d-\d\d\.\d\d:\d\d:\d\d) (¶\S+) (\S+) :(.*)/;
var colors = ['fcf7de', 'defde0', 'def3fd', 'f0defd', 'fddfdf', 'dfdfdf', 'B7C68B', 'F4F0CB', 'DED29E'];
@ -86,3 +88,5 @@ function handleFileSelect(evt)
reader.readAsText(file, "UTF-8");
}
document.getElementById('files').addEventListener('change', handleFileSelect, false);

Loading…
Cancel
Save