Request and onSuccess

by ghazal

HTML

<div id="myDiv"></div>

JavaScript

var getContentRequest = new Request({
    url: '/echo/html/',
    data: {html: 'hello'}, 
     method: 'post',
    onSuccess: function(responseText) {
        document.id('myDiv').set('html',responseText);
    }
}).send();