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
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Untitled Document</title>
- </head>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Untitled Document</title>
- </head>
- <body>
- <div id="giantEagle"></div>
- <input type="button" id="get" value="Get" onclick="testButton()" />
- <script src="jqueryUi/jquery-ui-1.8.23.custom/js/jquery-1.8.0.min.js"></script>
- <script src="jquery/edit.js"></script>
- <script>
- function testButton(){getTranslation("test");}
- function getTranslation(term){
- alert("test");
- $.ajax({
- url:"getEagle.php",
- data: 'term='+ term,
- success: function(data){
- $("#giantEagle").html(data);
- }
- }).complete(function(){
- alert("complete");
- }).success(function(){
- alert("success");
- }).error(function(){
- alert("error");
- });
- }
- </script>
- </body>
- </html>