<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function() { $("#my_button").click(function() { $("#status").html(''); $.ajax({ url: 'http://localhost/pt_14_03_2011_final/public/index.php/api/v1/geofences.xml', type: 'GET', beforeSend: function() { //$("#status").html("Loading..."); //alert("Sending"); $("#loading").show(); $("#status").html(''); }, complete: function() { $("#status").html("Complete"); }, success: function(data) { //alert("Done"); $("#loading").hide(); } }); }); }); </script> <body> <span id="loading" style="display:no...