AJAX Tricks and Prototype

Template

// the template (our formatting expression)
var myTemplate = new Template('The TV show #{title} was created by #{author}.');

// our data to be formatted by the template
var show = {title: 'The Simpsons', author: 'Matt Groening', network: 'FOX' };


myTemplate.evaluate(show)

José M. Vidal .

16 of 16