I defined two array utilitiy functions on a javascript file
Array.prototype.unique and Array.prototype.indexOf which i use on my application
The problem is that i have a dnn treview control and when i click the expand/collapse(+/-) it raises an error
the object doesn't support the method
the error is raised on the following piece of code
for (sKey in this.vars)
{
sVals += ROW_DELIMITER + sKey + COL_DELIMITER +
this.vars[sKey].replace(re, QUOTE_REPLACEMENT);
}
in the setvar function in dnn.js file(i believe this is a modified version of the setvar function as you suggested in one of my previous posts but i believe it doesn't matter to this issue)
the problem is that in this case the sKey variable through the iteration gets the references of the functions defined by Array.prototype besides its normal strings values, so the this.vars[sKey] and sVals will have these functions bodies in their values which i believe isn't right.
I solved this by adding the instruction
if(typeof this.vars[sKey] =='string') before adding the this.vars[sKey] value to sVals.
Thanks in advance!