new XMLHttpRequest()
        req.open('POST', '/editcommand/')
        var json = {
            'CMD': parseInt(document.getElementById('commands').value),
            'VALUE': parseFloat(document.getElementById('val').value),
            'XTIME': Date.parse(document.getElementById('xtime').value) / 1000,
            'INTERVAL': parseInt(document.getElementById('interval').value),
            'TXT': document.getElementById('txt').value,
            'IDX': index
        }
        req.send(JSON.stringify(json