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

javascript error

2 Answers 152 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
marksweat
Top achievements
Rank 1
marksweat asked on 27 Mar 2014, 06:47 PM
I'm evaluating an upgrade to the latest 2014 Q1 libs for the ASP.NET Ajax controls. I get this javascript error in both IE11 and Chrome. I've got a lot of stuff going on on this page, RadTreeViewControl, RadSpliter, RadGrid, RadTimePicker, RadScriptManager, RadAjaxManager, etc... I thoughtab I'd post this and see if I can get lucky about finding a solution before stripping the page down to figure out what's going on. This error occurs when I click on an item in the RadTreeViewControl.

Uncaught SyntaxError: An invalid or illegal string was specified. Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_MainContent_RadScriptManager11_TSM&compress=…:5369
Telerik.Web.UI.RadAjaxControl.updateHeadStyles Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_MainContent_RadScriptManager11_TSM&compress=…:5369
Telerik.Web.UI.RadAjaxControl.set_styles Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_MainContent_RadScriptManager11_TSM&compress=…:5168

The full exception is attached.

--Mark

2 Answers, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 01 Apr 2014, 08:56 AM
Hello Mark,

Thank you for contacting us.

It is possible that the error you are observing is due to a commented lines within the head tag of your page. Following is very simple scenario replicating the same error:
<head runat="server">
    <title></title>
    <style type="text/css">
        /*.someClass {
        }*/
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
 
        <telerik:RadAjaxPanel runat="server">
            <asp:Button runat="server" ID="Button1" />
        </telerik:RadAjaxPanel>
    </form>
</body>

The issue is due to the fact that during an ajax request the content of the head tag is also updated and returned in the request response which the browser is trying to parse but fails.

What I could suggest is that you either remove those commented lines or set the EnablePageHeadUpdate property of your RadAjaxPanel/RadAjaxManager to false.

Please give this a try and let me know if it solves the issue on your end.


Regards,
Konstantin Dikov
Telerik
 

Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

 
0
marksweat
Top achievements
Rank 1
answered on 01 Apr 2014, 05:40 PM
Konstantin,

Your post here got me looking in the head tag which is in my Master Page which I had not changed for some time. When I removed some VML settings the issue went away. Thanks for your attention.

--Mark
Tags
General Discussions
Asked by
marksweat
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
marksweat
Top achievements
Rank 1
Share this question
or