Projekt

Obecné

Profil

Stáhnout (1.99 KB) Statistiky
| Větev: | Revize:
1
<!-- TESTOVACI INDEX-->
2
<?
3
include "../controller/TableController.php"
4
include "../controller/UpdateController.php"
5
?>
6
<script>
7
    function doSearch () {
8
        // (A1) GET SEARCH TERM
9
        var data = new FormData();
10
        //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
        data.append("lemma", "nováLemma");
14
        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
        data.append("id", 47030);
28
        data.append("lemma_id", 3687);
29
        data.append("tag_id", 1220);
30
        data.append("pos", 1);
31
        data.append("manuscript", [1,2,3,4,5]);
32
        data.append("wordform_id", 4);
33
        data.append("tag", "A---------")
34
        //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
        var xhr = new XMLHttpRequest();
40
        xhr.open("POST", "../controller/UpdateController.php");
41
        xhr.onload = function(){
42
            let results = document.getElementById("results"),
43
                search = JSON.parse(this.response);
44
            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>
(1-1/8)