I have tried this:
========================
var handler = "editElementName";
function editElementNameSave()
{
        alert('Hurray!');
        console.log(1);
}
function showModalBox(handler)
{
        $(".1").click(function(){
                console.log(2);
                (handler + "Save")();
        });
        console.log(3);
}
$(document).ready(function(){
        showModalBox(handler);
});
========================

And I got "editElementNameSave is not a function" error !!!

Error refers to line -> (handler + "Save")();

----
Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com



On Thu, Jan 22, 2009 at 1:15 PM, Alex Sergeev <sergeev.sa...@gmail.com> wrote:
>
> Hello!
>
> i have a code
>
> var handler = "editElementName";
> function showModalBox(width, height, handler, id)
> {
> ...
> $(".btnSave").click(handler + "Save");
> ...
> }
>
> function editElementNameSave(e)
> {
> alert(1);
> }
>
> Why dont work event click?
>
> PS sorry for my English - i am from Russia
>

Reply via email to