Example - Yahoo! UI Library (YUI)
This example shows how to use velocity2js with YUI framework. Template from HelloWorld Example is used.Function call with YUI
function test() {
var handleSuccess = function(o){
var context = eval('(' + o.responseText + ')');
var html = v2js_helloworld(context);
YAHOO.util.Dom.get('test').innerHTML = html;
YAHOO.util.Dom.get('test').style.display = 'block';
}
var requestHandler = {
success:handleSuccess
};
var request = YAHOO.util.Connect.asyncRequest('GET', "example2/jsondata.html", requestHandler);
}