Click here to Skip to main content
16,018,006 members
Please Sign up or sign in to vote.
2.33/5 (3 votes)
See more:
i am getting below error :
Microsoft JScript runtime error: Object doesn't support property or method 'slice'
when i run the project in IE9.

n.replace.call(f.slice(e.index),a,function(){for(var c=1;c<arguments.length-2;c++)if(arguments[c]>
Posted
Comments
sawant parag 6-Sep-12 2:53am    
i get this line highlighted in yellow "n.replace.call(f.slice(e.index),a,function(){for(var c=1;c
Sergey Alexandrovich Kryukov 6-Sep-12 2:58am    
No, you don't :-)
--SA

1 solution

Who knows what is your f? Anyway, this is some object which does not have this method, that's it. Instead of asking such question, ask yourself why do you think that the function slice is defined in f. And then have it defined or use the object which has this function.

Chances are, you want to work with the array object which is defined for array objects and selects a range of elements of an array:
http://www.w3schools.com/jsref/jsref_slice_array.asp[^].

If this is what you need, you problem is that f is not an array. Trivial, yes, but this is all one can see from your question.

—SA
 
Share this answer
 
v2
Comments
Espen Harlinn 6-Sep-12 6:25am    
5'ed!
Sergey Alexandrovich Kryukov 6-Sep-12 13:04pm    
Thank you, Espen.
--SA
sawant parag 10-Sep-12 2:16am    
hi sergey ,
i get this error runtime . when i click on drop down defined in the page.
i am not able to find this from where the f is called and all.

thanks .
sawant parag 10-Sep-12 2:33am    
i get this error in IE .
Object doesn't support property or method 'slice'
..

its an issue related to jquery not support by IE..
please help to solve it .
Sergey Alexandrovich Kryukov 10-Sep-12 14:51pm    
I can help you more only if you provide more code; in particular, the line where f was assigned a value before the problematic line (you have already shown) is executed. However, you can find it out by yourself as I gave you the idea. You have your code, so you should know what f is.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900