I have a text file in the root of my web app http://localhost/foo.txt and I\'d like to load it into a variable in javascript.. in groovy I would do this:
here is how I did it in jquery:
jQuery.get('http://localhost/foo.txt', function(data) { alert(data); });