How to pass a parameter for a function parameter in a function




function foo(msg)
{
alert(msg);
}



var insertForm = function()
{
this.button = $('add_customer');

this.button.observe('click', foo('hello world'));
}

The above line ' this.button.observe('click', foo('hello world'));'
does not really work. It will work if I don't pass any parameters.
.