add item not found handler
This commit is contained in:
@@ -56,6 +56,9 @@
|
|||||||
$.get(DATA_PATH + encode_utf8(item_name) + ".txt",
|
$.get(DATA_PATH + encode_utf8(item_name) + ".txt",
|
||||||
function(data) {
|
function(data) {
|
||||||
$("#output").text(data);
|
$("#output").text(data);
|
||||||
|
}).fail(
|
||||||
|
function() {
|
||||||
|
$("#output").text("Error: item '" + item_name + "' not found");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user