X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=testing%2Fweb2io%2Ftest.js;fp=testing%2Fweb2io%2Ftest.js;h=4fb89338a5a78c6935274dd276c2a8384ec5f70c;hb=c1321a74436d6e7bfd56ae328a165e104fea2812;hp=0000000000000000000000000000000000000000;hpb=e615433eb0147f892049aaf7c720911f92ac84c1;p=matches%2FMCTX3420.git diff --git a/testing/web2io/test.js b/testing/web2io/test.js new file mode 100644 index 0000000..4fb8933 --- /dev/null +++ b/testing/web2io/test.js @@ -0,0 +1,14 @@ +$(document).ready(function() +{ + // Send AJAX request + $.ajax({url : "/sensor", data : {}}).done(function(data) {$(this).update(data)}); + + // Interpret AJAX response + $.fn.update = function(data) + { + console.log("Interpret AJAX response: "+data); + $("#body").html(""+data+"") + } + +}); +