jQuery AJAX get request - cannot see returned data

Posted by Wes on Stack Overflow See other posts from Stack Overflow or by Wes
Published on 2010-05-14T20:04:53Z Indexed on 2010/05/14 20:14 UTC
Read the original article Hit count: 266

Filed under:
|

I think I am missing something obvious here, but I can't figure it out. I expect the following HTML to alert a response from the server. But, the alert is empty. I can see in Wireshark that the expected response is coming back to me from the server. Why is it not populated in the data variable?

<html>
<head>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
</head>
<body>
<script type="text/javascript">
  $.get("http://www.geocommunicator.gov/TownshipGeocoder/TownshipGeocoder.asmx/GetTRS",
        {'Lat': 41,
         'Lon': -93,             
         'Units': 'eDD',
         'Datum': ''},      
        function(data) {
            alert('data:'+data);
        });
</script>
</body>
</html>

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about jquery-ajax