Projekt

Obecné

Profil

Stáhnout (2.01 KB) Statistiky
| Větev: | Revize:
1 3b343aea Tomáš Pašek
<!-- TESTOVACI INDEX-->
2
<?
3
include "../controller/TableController.php"
4 2a99773b Milan Vacek
include "../controller/UpdateController.php"
5 3b343aea Tomáš Pašek
?>
6
<script>
7
    function doSearch () {
8
        // (A1) GET SEARCH TERM
9
        var data = new FormData();
10 2a99773b Milan Vacek
        //data.append("manuscript", "0,3"); //příklad pro filtraci manuscriptů, asi se ještě uprav
11
        data.append("page", "0");
12
        data.append("items_per_page", "50");
13 82f8d4ca Milan Vacek
        data.append("lemma", "megaultranováLemma");
14 2a99773b Milan Vacek
        data.append("word", "novéWord2");
15
        data.append("context", "novýContext");
16
        data.append("description", "novádescription");
17
        data.append("description2", "novádescription2");
18
        data.append("description3", "novádescription3");
19
        data.append("ending", "novéEnding");
20
        data.append("finished", false);
21
        data.append("namedentity",1);
22
        data.append("position1", "1");
23
        data.append("position2", "2");
24
        data.append("positiondetail", "posdet");
25
        data.append("prefix", "prefix");
26
        data.append("suffix", "suffix");
27 79c140ee Milan Vacek
        data.append("id", 47030);
28 82f8d4ca Milan Vacek
        //data.append("lemma_id", 3686);
29
        //data.append("tag_id", 1219);
30 2a99773b Milan Vacek
        data.append("pos", 1);
31 b315cd75 Milan Vacek
        data.append("manuscript", [1,2,3,4,5]);
32 2a99773b Milan Vacek
        data.append("wordform_id", 4);
33 82f8d4ca Milan Vacek
        data.append("tag", "NOVEAAA---------")
34 2a99773b Milan Vacek
        //data.append("finished", "false");
35
        // data.append("tag_pos", "V");
36
        // data.append("tag_verb_aspect", "P");
37
        // data.append("tag_number", "S");
38
        // data.append("word", "okáza");
39 3b343aea Tomáš Pašek
        var xhr = new XMLHttpRequest();
40 2a99773b Milan Vacek
        xhr.open("POST", "../controller/UpdateController.php");
41 3b343aea Tomáš Pašek
        xhr.onload = function(){
42
            let results = document.getElementById("results"),
43 2a99773b Milan Vacek
                search = JSON.parse(this.response);
44 3b343aea Tomáš Pašek
            results.innerHTML = "";
45
            console.log(search);
46
        };
47
        xhr.send(data);
48
        return false;
49
    }
50
</script>
51
52
<form onsubmit="return doSearch()">
53
    <input type="submit" value="Search"/>
54
</form>
55
56
<div id="results"></div>