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

Error: Uncaught SyntaxError: Unexpected token '<'

3 Answers 4899 Views
ScriptManager and StyleSheetManager
This is a migrated thread and some comments may be shown as answers.
Gilberto
Top achievements
Rank 1
Veteran
Gilberto asked on 30 May 2020, 01:19 PM

Hello.

 

Any time I put a ScriptManager in my login page, I get this error message Uncaught SyntaxError: Unexpected token '<' and my login control does not get decorated.

What can it be?

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Login.aspx.vb" Inherits="SmartERP.Login" %>
 
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
 
 
<!DOCTYPE html>
 
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>Smart-ERP</title>
    <script type="text/javascript">
            function GetWndSize() {
            
                var w = screen.width;
                var h = screen.height;
 
                document.getElementById('TxtOcultoWidth').value = w;
                document.getElementById('TxtOcultoHeight').value = h;
            }
    </script>
</head>
<body onload="GetWndSize()">
 
 
    <form id="form1" runat="server">
        <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
        <asp:TextBox runat="server" ClientIDMode="Static" ID="TxtOcultoWidth" EnableViewState="true" style="display:none"/>
        <asp:TextBox runat="server" ClientIDMode="Static" ID="TxtOcultoHeight" EnableViewState="true" style="display:none"/>
 
        <telerik:RadFormDecorator RenderMode="Lightweight" ID="RadFormDecorator1" runat="server" DecoratedControls="All"
                DecorationZoneID="DivDecorar" />
 
        <div id="DivDecorar" >
            <asp:Table runat="server" Width="100%" Height="100%">
                <asp:TableRow>
                    <asp:TableCell HorizontalAlign="Center">
                        <asp:Image ID="Image2" runat="server" ImageUrl="~/images/SE-logo.png" />
                    </asp:TableCell>
                </asp:TableRow>
                <asp:TableRow>
                    <asp:TableCell HorizontalAlign="Center">
                        <telerik:RadLabel ID="LblMensaje" Font-Size="Larger" ForeColor="#ff9900" Font-Bold="false" runat="server" Text="ola khe ase" Skin="Material" Visible="false"></telerik:RadLabel>
                    </asp:TableCell>
                </asp:TableRow>
                <asp:TableRow Width="100%" Height="100%">
                    <asp:TableCell Width="100%" Height="100%" HorizontalAlign="Center">
                        <asp:Login ID="Login1" runat="server" DisplayRememberMe="false" LoginButtonText="Ingresar" UserNameLabelText="Usuario:"></asp:Login>
                    </asp:TableCell>
                </asp:TableRow>
            </asp:Table>
        </div>
    </form>
</body>
</html>

3 Answers, 1 is accepted

Sort by
0
Accepted
Vessy
Telerik team
answered on 03 Jun 2020, 03:05 PM

Hi Gilberto,

There are several things that can lead to the faced errors. Please, go through the steps below and see if following them will help you to resolve the issue:

  • Make sure that all required by our controls web.config settings are applied - link
  • Make sure that the application is AJAX enabled - link
  • Make sure that the Telerik handlers are granted with full permissions: - link
  • Review the following article and try the suggested solutions: link

Regards,
Vessy
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
0
Gilberto
Top achievements
Rank 1
Veteran
answered on 04 Jun 2020, 04:18 PM

Thank you very very much!!!! In deed It semms I found the answer with your second step. It was a permission issue (only happens in login page when our website denies access to all pages to unauthorized users). I leave here my solution it someone need it:

Just add this in the configuration file:

<configuration>
...
<location path="Telerik.Web.UI.WebResource.axd">
   <system.web>
     <authorization>
       <allow users="*"/>
     </authorization>
   </system.web>
 </location>
...
</configuration>
0
Vessy
Telerik team
answered on 05 Jun 2020, 05:13 AM

Hi,

You are absolutely welcome, Gilberto - I am really glad my suggestion was helpful for you.

Thanks a lot for sharing the found solution with our community :)

Regards,
Vessy
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
ScriptManager and StyleSheetManager
Asked by
Gilberto
Top achievements
Rank 1
Veteran
Answers by
Vessy
Telerik team
Gilberto
Top achievements
Rank 1
Veteran
Share this question
or