I'm using javascript to call functions that have been put into an object like so:
generatewidgets['mywidget'] = function (mystring) { code }
Later on, i loop through this object and call each function with a string parameter.
argument = 'abcdefg';
for (this.key in generatewidgets)
generatewidgets[this.key](argument);
This works fine in IE8, but in firefox throws an error "argument is not a function". It does this with any variable name i specify for the string. I've also tried:
generatewidgets[this.key](argument+'');
which results in "'abcdefg' is not a function". Anyone know what this error means or why I'm getting it?