Does anybody know how to call a javascript function such as
function sampleCallback() {
alert("hello");
}
from a string "sampleCallback()"?
I have a multidimensional array like so:
hintSlidesArray = [
[{ "element": "noelement" }, { "hintMessage": "Welcome"}, "callback": "sampleCallback" }],
];
And would like to pass the callback string to it so that I can run it from where im reading the array.
eval("sampleCallback()")