problems with ajax

problems with ajax

Below is a bare bones jQuery ajax call, but does not seem to work. I dont even get the ajax status functions to fire.
Please comment


  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>Untitled Document</title>
  6. </head>
  7. <head>
  8. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  9. <title>Untitled Document</title>
  10. </head>
  11. <body>
  12. <div id="giantEagle"></div>
  13. <input type="button" id="get" value="Get" onclick="testButton()" />
  14. <script src="jqueryUi/jquery-ui-1.8.23.custom/js/jquery-1.8.0.min.js"></script>
  15. <script src="jquery/edit.js"></script>
  16. <script>
  17. function testButton(){getTranslation("test");}
  18. function getTranslation(term){
  19. alert("test");
  20. $.ajax({
  21. url:"getEagle.php",
  22. data: 'term='+ term,
  23. success: function(data){
  24. $("#giantEagle").html(data);
  25. }
  26. }).complete(function(){
  27. alert("complete");
  28. }).success(function(){
  29. alert("success");
  30. }).error(function(){
  31. alert("error");
  32. });
  33. }
  34. </script>
  35. </body>
  36. </html>