Mercurial > hg > human-echolocation-java-webapp
view WebContent/script/echo.js @ 27:3b092b89c92e
Using JQuery to generate the AJAX call. Added a AJAX indicator.
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Mon, 09 Dec 2013 16:57:52 +0000 |
parents | |
children |
line wrap: on
line source
// humanecho.js $(document).bind("ajaxSend", function(){ $(".ajax-loader").show(); }).bind("ajaxComplete", function(){ $(".ajax-loader").hide(); }); $(document).ready(function(){ $("#generate").click(function(){ alert("Gonna call.."); var distance = $("#dist").val(); console.log(distance); $.get('HumanEcho', { dist: distance }, function(responseText) { $('#responsetext').text('OK'); }); }); });