Projekt

Obecné

Profil

Stáhnout (2.03 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", 4);
28
        data.append("lemma_id", 1);
29
        data.append("tag_id", 1);
30
        data.append("pos", 1);
31
        data.append("manuscript", [1,2,3,4]);
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
                //if anything returned then do this
44
                search = JSON.parse(this.response);
45
            results.innerHTML = "";
46
            console.log(search);
47
        };*/
48
        xhr.send(data);
49
        return false;
50
    }
51
</script>
52

    
53
<form onsubmit="return doSearch()">
54
    <input type="submit" value="Search"/>
55
</form>
56

    
57
<div id="results"></div>
(1-1/7)