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

Broken Javascript

2 Answers 90 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 2
Alex asked on 11 Feb 2015, 10:10 PM
I have a in-house web-app that has been in production for 3 years. We have been using an old version of IE (9 to be precise).

We are testing IE11 now and I have this weird issue.

On some of my Telerik controls I have client-side events, ex.: on a radComboBox I have <I>onclientselectedindexchanged</I> and an associated event (function).

In IE11 I get the following error "JavaScript runtime error: 'rcbMarketTypeIndexChanged' is undefined", but in IE9, current versions of Firefox and Chrome I do not get any such errors and the functionality related to 'rcbMarketTypeIndexChanged' executes fine.

The javascript is embedded in the aspx file with the proper <scripts> tags.

I'm assuming that it might be related to a javacript syntax error (that I cannot find) which is rearing it's ugly head but I would assume it would affect other browsers including IE9 if that was the case.

Any suggestions on how to pin-point and rule out a javascript syntax issue.

Thanks

2 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 13 Feb 2015, 03:56 PM

Hi Alex,

It is possible that IE11 is now in compatibility mode, and treats scripts as it if were IE7, so it is possible that a coma at the end of a JSON literal breaks your scripts. This is, of course, just a guess at this point.

What I can suggest is the following:

If this does not help you find and correct the error, it should leave you with a sample you can send us so we can review it.

Regards,

Marin Bratanov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Alex
Top achievements
Rank 2
answered on 27 Feb 2015, 09:46 PM
Finally figured out the situation.

All of my javascript, including radscriptblocks are at the end of my HTML to help load performance on slow connections.

Moving the javascript to the top of the content page solved this problem.

I did some testing and only telerik controls had problems with javascript being at the bottom of the page in IE11, html controls that called javascript didn't care where the javascript was.



Tags
General Discussions
Asked by
Alex
Top achievements
Rank 2
Answers by
Marin Bratanov
Telerik team
Alex
Top achievements
Rank 2
Share this question
or