I'm having trouble making this work:
$(function() {
$(".button").click(function() {
var newentry = $("input#entry").val();
$.getJSON("/dictionary_request/", {entry: newentry}, function(json){
$("span").empty();
alert(json);
$("span").append(json);
});
});
});
The JSON request, the emptied span, and the alert all work fine, but the append doesn't. I'm assuming it's some kind of type error. How can I make it work?