mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 21:03:17 -07:00
Some more work. Need to stop the form submitting on a request
This commit is contained in:
parent
9a78f790a6
commit
96a3970a53
7 changed files with 106 additions and 8 deletions
|
@ -17,6 +17,34 @@ $("#tvSearchContent").on("keyup", function (e) {
|
|||
tvimer = setTimeout(tvSearch(), 400);
|
||||
});
|
||||
|
||||
|
||||
$("#test").click(function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
var $form = $('#form'+e.target.id);
|
||||
|
||||
$.ajax({
|
||||
type: $form.prop('method'),
|
||||
url: $form.prop('action'),
|
||||
data: $form.serialize(),
|
||||
dataType: "json",
|
||||
success: function (response) {
|
||||
console.log(response);
|
||||
if (response.Result === true) {
|
||||
generateNotify("Success!", "success");
|
||||
} else {
|
||||
generateNotify(response.Message, "warning");
|
||||
}
|
||||
},
|
||||
error: function (e) {
|
||||
console.log(e);
|
||||
generateNotify("Something went wrong!", "danger");
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
function movieSearch() {
|
||||
$("#movieList").html("");
|
||||
var query = $("#movieSearchContent").val();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue