fork download
  1. $(function(){
  2. $('#search').keyup(function() {
  3. $.ajax({
  4. type: "POST",
  5. url: "/search/",
  6. data: {
  7. 'search_text' : $('#search').val(),
  8. 'csrfmiddlewaretoken' : $("input[name=csrfmiddlewaretoken]").val()
  9. },
  10. success: searchSuccess,
  11. dataType: 'html'
  12. });
  13.  
  14. });
  15. });
  16.  
  17. function searchSuccess(data, textStatus, jqXHR)
  18. {
  19. $('#search-results').html(data);
  20. }
Runtime error #stdin #stdout #stderr 0.01s 29880KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
prog.js:1:0 ReferenceError: $ is not defined