This is a migrated thread and some comments may be shown as answers.

e.startsWith is not a function

2 Answers 122 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jan Jerell
Top achievements
Rank 1
Jan Jerell asked on 09 Sep 2011, 01:10 AM
Hi,

Good day!

I use different ASP.Net Telerik controls in every page in my project.
I'm getting this javascript error: "e.startsWith is not a function"
every time I click every where on the page.

The error is in MicrosoftAjax.js which is embedded in the page by the Telerik.
I attached here the screenshot of the error I'm getting.

Does anybody here also experienced this error? How did you fix it?

Thank you.


Jan

2 Answers, 1 is accepted

Sort by
0
Steve
Top achievements
Rank 2
Veteran
answered on 09 Sep 2011, 11:24 PM
Wieeerd....Whats the Browser Version and RadControls Version?

Is this Live somewhere in which I can see?
0
Jan Jerell
Top achievements
Rank 1
answered on 13 Sep 2011, 05:59 AM
With deep tracing on the javascript file. I was able to figure it out what did the error but I am not able to figure out the real cause.
In the code, it tries to call the startsWith function with a variable that holds function() object like: if ( e.startsWith(blahblahblahID))
where e = function()

I fixed it by adding the startsWith function to Function object in a separate javascript file which I then add later to the page.
Here's what I did:
Function.prototype.startsWith = function (str) {
    return false;
}



And that did the fix. :)
Tags
General Discussions
Asked by
Jan Jerell
Top achievements
Rank 1
Answers by
Steve
Top achievements
Rank 2
Veteran
Jan Jerell
Top achievements
Rank 1
Share this question
or