Ajax example

A simple jquery ajax example.

HTML

<input id="text" type="textbox" value="Test Echo"/>
<input id="sendit" type="button" value="submit" />

JavaScript

$('#sendit').click(function() {
    $.ajax('/echo/html/', {
        type: "POST",
        data: {html: $('#text').val(), 
               delay: 1},
        success: function(data) {alert(data);}
    });
}
);

//This results in an XHR POST /echo/html?html=whather-is-in-textbox&delay=1
//In jsfiddle this results in a response containing: 'whatever-is-in-textbox'

//In the app engine you would write a handler for this url, withing it you
// can get the value of the 'html' param with:
// self.request.get('html')