Projekt

Obecné

Profil

Stáhnout (1.05 KB) Statistiky
| Větev: | Revize:
1
<!-- TESTOVACI INDEX-->
2
<?
3
include "../controller/TableController.php"
4
?>
5
<script>
6
    function doSearch () {
7
        // (A1) GET SEARCH TERM
8
        var data = new FormData();
9
        //data.append("manuscript", "0,3"); //příklad pro filtraci manuscriptů, asi se ještě uprav
10
        data.append("page", "1");
11
        data.append("items_per_page", "50");
12
        data.append("finished", "false");
13
        // data.append("tag_pos", "V");
14
        // data.append("tag_verb_aspect", "P");
15
        // data.append("tag_number", "S");
16
        // data.append("word", "okáza");
17
        var xhr = new XMLHttpRequest();
18
        xhr.open("POST", "../controller/TableController.php");
19
        xhr.onload = function(){
20
            let results = document.getElementById("results"),
21
                search = JSON.parse(this.response);
22
            results.innerHTML = "";
23
            console.log(search);
24
        };
25
        xhr.send(data);
26
        return false;
27
    }
28
</script>
29

    
30
<form onsubmit="return doSearch()">
31
    <input type="submit" value="Search"/>
32
</form>
33

    
34
<div id="results"></div>
(1-1/8)