}
        req.send(JSON.stringify(json))
        console.log(json)
    }

    function loadfromfile() {
        var filename = prompt("Please enter a filename", "mycommandqueue1")
        if (filename == null) return
        var req = new XMLHttpRequest()
        req.open('POST', '/cmdq_file/')
        var json = {
            'ACT': 'load',
            'NAME': filename
        }
        req.send(JSON.stringify(json))
        console.log(json)
    }

    function editCommandQueue(index) {
        var req = 