Created
August 2, 2013 01:54
-
-
Save facumartig/6136950 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("form#search>input:text").on("keyup", function (event) { | |
event.preventDefault(); | |
var search_q = $(this).serializeArray(); | |
search_q[search_q.length] = { | |
"name": "action", | |
"value": "select" | |
}; | |
$.ajax({ | |
type: "POST", | |
dataType: "json", | |
data: search_q, | |
url: "./php/func_events.php", | |
beforeSend: function () { | |
tbody.html(loading); | |
}, | |
success: function (data) { | |
getEventsTable(data); | |
}, | |
error: function () { | |
tbody.html(not_found); | |
} | |
}); | |
}); | |
$("form#search").on("submit", function (event) { | |
event.preventDefault(); | |
var search_q = $(this).serializeArray(); | |
search_q[search_q.length] = { | |
"name": "action", | |
"value": "select" | |
}; | |
$.ajax({ | |
type: "POST", | |
dataType: "json", | |
data: search_q, | |
url: "./php/func_events.php", | |
beforeSend: function () { | |
tbody.html(loading); | |
}, | |
success: function (data) { | |
getEventsTable(data); | |
}, | |
error: function () { | |
tbody.html(not_found); | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment