JavaScript
with unobtrusive JavaScript you can avoid inline event handlers. getting unobtrusive is to axe all inline event handlers, since they can easily be registered via the DOM
function doSome(callback) {
// ...
//call the callback
callback('stuff', 'goes', 'here');
}
function foo(a, b, c) {
//the callback
alert(a + " " + b + " " + c);
}
doSome(foo);
that will call doSome, which will call foo, which will alert.
important to pass the function reference (foo).