1
<!DOCTYPE html>
2
<html>
3
<head>
4
    <meta charset="utf-8" />
5
    <title>Wialon Playground - Import fillings</title>
6
    <script type="text/javascript" src="//code.jquery.com/jquery-latest.min.js"></script>
7
    <script type="text/javascript" src="//hst-api.wialon.com/wsdk/script/wialon.js"></script>
8
</head>
9
<body>
10
11
<fieldset>
12
  <legend>Import fillings:</legend>
13
    <input type="file" name="import_file" id="import_file"/>
14
    <input id="import_button" type="submit" value="Upload & Import"/>
15
</fieldset>
16
<br/>    
17
<fieldset>
18
  <legend>Log :</legend>
19
    <div id="log_cont">
20
      <table>
21
        <tbody id="log"></tbody>
22
      </table>
23
    </div>
24
</fieldset>
25
26
</body>
27
</html>
HTML
7
 
1
#log_cont {
2
    background-color: #EEEEEE;
3
    overflow-y: scroll;
4
    font-size: 75%;
5
    height: 150px;
6
}
7
CSS
239
 
1
var importFillings = {
2
    constructor: null,
3
    id: "importFillings",
4
    type: "importFillings",
5
    user: {},
6
    files: "",
7
    units: {},
8
    arrSearch: [],
9
    arrData: [],
10
    session: {},
11
    unitsToImport: [],
12
13
doImport: function () {
14
    importFillings.arrSearch.sort();
15
16
    for (var i = 0; i < importFillings.arrData.length; i++) {
17
        for (var j = 0; j < importFillings.arrSearch.length; j++) {
JS
Result
Source code of example Close ✕
1
 
1
/*source*/