How to pass a parameter for a function parameter in a function
- From: AzamSharp <azamsharp@xxxxxxxxx>
- Date: Fri, 4 Jul 2008 12:07:12 -0700 (PDT)
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.
.
- Follow-Ups:
- Prev by Date: Re: Javascript Slideshow + MS Acess
- Next by Date: Re: How to pass a parameter for a function parameter in a function
- Previous by thread: Javascript Opacity - Fading In and Out
- Next by thread: Re: How to pass a parameter for a function parameter in a function
- Index(es):