Link to home
Start Free TrialLog in
Avatar of tonelm54
tonelm54

asked on

Call function as array

Im trying to call a function from an array value, I thought I could assign it by:-
var defaults = {
            'afterClose' : function () { alert("Not Declared"); }
        }

Open in new window

And then call it like:-
argArray['afterClose'];

Open in new window


However doesnt seem to work. Does anyone know how I can call functions stored as variables in an array?

Ive uploaded what Im trying to do to jsFiddle at http://jsfiddle.net/EcvKj/, as you can see Ive not really done much on it yet, its just to get my ideas down and possibly working.

Thanks in advance for any support any one can provide.
ASKER CERTIFIED SOLUTION
Avatar of tonelm54
tonelm54

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial