summaryrefslogtreecommitdiff
path: root/root/static/search.js
blob: 8d8ff9f3312390dc490372f628dc1f01c485f728 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
$(function() {
    $("#submit").click(function() {
        $('#spinner').show();
        $('#view').hide();
        var q = $("input#q").val();
        var dataString = 'q='+ q;
        $.ajax({
            type: "POST",
            url: "search",
            data: dataString,
            //dataType: "json",
            success: function(response) {
                alert(response);
                $('#view').show().html(response);
                $('#spinner').hide();
            }
        });
        return false;
    });
});