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

RadScriptManager 'EnableScriptCombine' causing object expected script errors.

1 Answer 102 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Alan
Top achievements
Rank 1
Alan asked on 24 Sep 2008, 04:06 PM

Our application has started generating an Object Expected javascript error when a RadNumericTextBox or RadDateInput control is displayed in a multiview control as the result of an ajax request.

After much trial and error messing around I came across the RadScriptManager 'EnableScriptCombine' property. This being a script problem I turned it off and presto the problem disappeared.

If you can shed any light on this and ideally a solution I would be grateful. Code segment below. (Note script manager is on the master page.)

<%@ Page Language="C#" MasterPageFile="~/Default.Master" AutoEventWireup="true" CodeBehind="Ecrs.aspx.cs" Inherits="Sinclair.ECM.WebUI.Ecr.Ecrs" Title="All ECRs" %> 
<%@ Import Namespace="Sinclair.ECM.WebUI.Common" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cp1" runat="server">
<h1><asp:Label ID="lblViewName" CssClass="iconDocs" runat="server">All ECRs</asp:Label></h1> 
<p>To view an ECR, click on its ID. Additionally you can use the filter fields below to narrow down the results. </p>

<telerik:RadAjaxManager runat="server" ID="ramFilterCriteria" >
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="cboFilter">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="mvFilterCriteria" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>

<div class="gridPanelAbove">
<div class="gridPanelAboveLeft">

<div class="ecrFilter" id="ECRfilters">
<div class="ecrFilterLeft">
<table class="table">
<tr>
<td>
Filter options <br />
<telerik:RadComboBox ID="cboFilter" runat="server" AllowCustomText="false" AutoPostBack="true" DropDownWidth="180px">
<Items>
<telerik:RadComboBoxItem Value="-1" Text="Select filter" />
<telerik:RadComboBoxItem Value="0" Text="ECR No" />
<telerik:RadComboBoxItem Value="1" Text="Date created" />
<telerik:RadComboBoxItem Value="2" Text="Date closed" />
<telerik:RadComboBoxItem Value="3" Text="Machine" />
<telerik:RadComboBoxItem Value="4" Text="Part number" />
<telerik:RadComboBoxItem Value="5" Text="ECR category" />
<telerik:RadComboBoxItem Value="6" Text="CAF No" />
<telerik:RadComboBoxItem Value="7" Text="Free text" />
<telerik:RadComboBoxItem Value="8" Text="Creator" />
<telerik:RadComboBoxItem Value="9" Text="Priority" />
<telerik:RadComboBoxItem Value="10" Text="Assigned to department" />
<telerik:RadComboBoxItem Value="11" Text="Assigned to person" />
<telerik:RadComboBoxItem Value="12" Text="Tasks assigned to person" />
<telerik:RadComboBoxItem Value="13" Text="Tasks assigned to department" />
<telerik:RadComboBoxItem Value="14" Text="ECR status" />
<telerik:RadComboBoxItem Value="15" Text="Review criteria" />
<telerik:RadComboBoxItem Value="16" Text="ECR required date" />
<telerik:RadComboBoxItem Value="17" Text="Review requested" />
</Items>
</telerik:RadComboBox>
</td>
</tr>
</table>
</div>

<div class="ecrFilterMiddle">
<div class="ecrFilterMiddleFields">
<asp:MultiView ID="mvFilterCriteria" runat="server">
<asp:View ID="vwNumeric" runat="server">
<table class="table">
<tr>
<td>
ECR No<br />
<telerik:RadNumericTextBox ID="txtNumber" runat="server" NumberFormat-DecimalDigits="0" NumberFormat-GroupSeparator=""></telerik:RadNumericTextBox>
</td>
</tr>
</table>
</asp:View>
<asp:View ID="vwDateRange" runat="server">
<table class="table">
<tr>
<td>
From<br />
<telerik:RadDateInput ID="dteFromDate" runat="server"></telerik:RadDateInput>
</td>
<td>
To<br />
<telerik:RadDateInput ID="dteToDate" runat="server"></telerik:RadDateInput>
</td>
</tr>
</table>
</asp:View>
<asp:View ID="vwMachine" runat="server">
<table class="table">
<tr>
<td>Machine<br /><telerik:RadComboBox ID="cboMachine" runat="server" DataSourceID="ldsMachine" AllowCustomText="false" DataTextField="Name" DataValueField="ID"></telerik:RadComboBox></td>
</tr>
</table>
</asp:View>
<asp:View ID="vwText" runat="server">
<table class="table">
<tr>
<td>
<asp:label ID="lblTextboxtitle" runat="server"></asp:label><br />
<asp:TextBox ID="txtText" CssClass="fieldInputBox" runat="server" ValidationGroup="textSearch" /><asp:RequiredFieldValidator ID="rvSearchText" runat="server" ControlToValidate="txtText" ErrorMessage="Please enter something to search for." Display="Dynamic" ValidationGroup="textSearch"></asp:RequiredFieldValidator>
</td>
</tr>
</table>
</asp:View>
<asp:View ID="vwECRCategory" runat="server">
<table class="table">
<tr>
<td>ECR category<br /><telerik:RadComboBox ID="cboECRCategory" runat="server" DataSourceID="ldsCategory" AllowCustomText="false" DataTextField="Name" DataValueField="ID" DropDownWidth="200px"></telerik:RadComboBox></td>
</tr>
</table>
</asp:View>
<asp:View ID="vwCAFNumber" runat="server">
<table class="table">
<tr valign="top">
<td>
CAF number<br />
<asp:TextBox ID="txtCAFNumber" CssClass="fieldInputBox" runat="server" />
</td>
<td>
<asp:RadioButtonList ID="rblCAFSearchOptions" runat="server">
<asp:ListItem Text="Search for CAF number" Value="0" Selected="True" />
<asp:ListItem Text="Show all empty CAF numbers" Value="1" />
<asp:ListItem Text="Show all populated CAF numbers" Value="2" />
</asp:RadioButtonList>
</td>
</tr>
</table>
</asp:View>
<asp:View ID="vwUser" runat="server">
<table class="table">
<tr>
<td>Creator<br /><telerik:RadComboBox ID="cboUser" runat="server" DataSourceID="ldsCreators" AllowCustomText="false" DataTextField="Fullname" DataValueField="ID"></telerik:RadComboBox></td>
</tr>
</table>
</asp:View>
<asp:View ID="vwPriorityRange" runat="server">
<table class="table">
<tr>
<td>From<br /><telerik:RadNumericTextBox ID="numFrom" MinValue="0" MaxValue="999" runat="server"></telerik:RadNumericTextBox></td>
<td>To<br /><telerik:RadNumericTextBox ID="numTo" MinValue="0" MaxValue="999" runat="server"></telerik:RadNumericTextBox></td>
</tr>
</table>
</asp:View>
<asp:View ID="vwDepartment" runat="server">
<table class="table">
<tr>
<td>Responsible department<br /><telerik:RadComboBox ID="cboDepartment" runat="server" DataSourceID="ldsDepartment" AllowCustomText="false" DataTextField="Name" DataValueField="ID"></telerik:RadComboBox></td>
</tr>
</table>
</asp:View>
<asp:View ID="vwAllUsers" runat="server">
<table class="table">
<tr>
<td>Who<br /><telerik:RadComboBox ID="cboAllUsers" runat="server" DataSourceID="ldsAllUsers" AllowCustomText="false" DataTextField="Fullname" DataValueField="ID"></telerik:RadComboBox></td>
</tr>
</table>
</asp:View>
<asp:View ID="vwECRStatuses" runat="server">
<table class="table">
<tr>
<td>ECR status<br /><telerik:RadComboBox ID="cboECRStatus" runat="server" DataSourceID="ldsECRStatuses" AllowCustomText="false" DataTextField="Name" DataValueField="ID"></telerik:RadComboBox></td>
</tr>
</table>
</asp:View>
</asp:MultiView>
</div>

<div class="ecrFilterMiddleButton">
<asp:Button ID="btnFilter" runat="server" Text="Search" CssClass="buttonClass" />
</div>
</div>
</div>
</div>

<div class="gridPanelAboveRight">
<table>
<tr>
<td>Items per page</td>
<td>
<telerik:RadComboBox ID="cboEcrsPageSize" runat="server" SkinID="cboPageSize" AutoPostBack="true" CausesValidation="false"></telerik:RadComboBox>
</td>
</tr>
</table>
</div>
<div style="clear: both;"></div>
</div>

<telerik:RadGrid ID="rgEcr" runat="server" DataSourceID="ldsEcr" AutoGenerateColumns="False" AllowPaging="true" PagerStyle-AlwaysVisible="true" AllowSorting="true" EnableTheming="false">
<MasterTableView DataKeyNames="ID" NoMasterRecordsText="There are no matching ECRs. Please click <a href='javascript:AddEcr();'>create originalAttribute="href" originalPath="'javascript:AddEcr();'>create" originalAttribute="href" originalPath="'javascript:AddEcr();'>create" originalAttribute="href" originalPath="'javascript:AddEcr();'>create" originalAttribute="href" originalPath="'javascript:AddEcr();'>create" ECR</a> to create one.">
<Columns>
<telerik:GridHyperLinkColumn UniqueName="ID" DataTextField="ID" DataNavigateUrlFields="ID" HeaderText="ID" SortExpression="ID" />
<telerik:GridBoundColumn UniqueName="CategoryName" DataField="CategoryName" HeaderText="Category" />
<telerik:GridBoundColumn UniqueName="StatusName" DataField="StatusName" HeaderText="Status" />
<telerik:GridBoundColumn UniqueName="StatusReasonName" DataField="StatusReasonName" HeaderText="Review criteria" />
<telerik:GridBoundColumn UniqueName="AssignedToName" DataField="AssignedTo" HeaderText="Assigned To" />
<telerik:GridBoundColumn UniqueName="Title" DataField="Title" HeaderText="Title" />
<telerik:GridBoundColumn UniqueName="PriorityValue" DataField="Priority" HeaderText="Priority" />
<telerik:GridBoundColumn UniqueName="EcnStatusName" DataField="EcnStatusName" HeaderText="ECN Status" SortExpression="EcnStatusName"/>
<telerik:GridBoundColumn UniqueName="CafNumber" DataField="CafNumber" HeaderText="CAF" />
<telerik:GridBoundColumn UniqueName="DateRequired" DataField="DateRequired" DataFormatString="{0:d}" HeaderText="Date required" />
<telerik:GridBoundColumn UniqueName="ReviewRequestFlag" DataField="ReviewRequestFlag" HeaderText="Review request" />
</Columns>
</MasterTableView>
</telerik:RadGrid>


<div class="buttonBar">
<asp:Button ID="btnAddEcr" runat="server" CssClass="buttonClass" Text="Create ECR" OnClientClick="AddEcr(); return false;" />
<asp:Button ID="btnCancel" runat="server" Visible="false" CssClass="buttonClass" Text="Cancel" OnClientClick="location.href=location.href; originalAttribute="href" originalPath="location.href;" originalAttribute="href" originalPath="location.href;" originalAttribute="href" originalPath="location.href;" originalAttribute="href" originalPath="location.href;" return false;" />
</div>

<asp:LinqDataSource ID="ldsEcr" runat="server" ContextTypeName="Sinclair.ECM.WebUI.Model.DBModelDataContext" AutoPage="true" AutoSort="true" ></asp:LinqDataSource>

<asp:LinqDataSource ID="ldsMachine" runat="server" ContextTypeName="Sinclair.ECM.WebUI.Model.DBModelDataContext" TableName="Machines" OrderBy="Name" Where="!ActiveToDateTime.HasValue || ActiveToDateTime > DateTime.Now"></asp:LinqDataSource>
<asp:LinqDataSource ID="ldsCategory" runat="server" ContextTypeName="Sinclair.ECM.WebUI.Model.DBModelDataContext" TableName="Categories" OrderBy="Name"></asp:LinqDataSource>
<asp:LinqDataSource ID="ldsCreators" runat="server" OrderBy="Fullname"></asp:LinqDataSource>
<asp:LinqDataSource ID="ldsDepartment" runat="server" ContextTypeName="Sinclair.ECM.WebUI.Model.DBModelDataContext" TableName="Departments" OrderBy="Name" Where="!ActiveToDateTime.HasValue || ActiveToDateTime > DateTime.Now"></asp:LinqDataSource>
<asp:LinqDataSource ID="ldsAllUsers" runat="server" OrderBy="Fullname"></asp:LinqDataSource>
<asp:LinqDataSource ID="ldsECRStatuses" runat="server" ContextTypeName="Sinclair.ECM.WebUI.Model.DBModelDataContext" TableName="EcrStatus" OrderBy="Name"></asp:LinqDataSource>

<telerik:RadCodeBlock runat="server" ID="rdcEcrs">
<script type="text/javascript">
function AddEcr()
{
location.href="CreateEcr.aspx";
}

function ManageEcr(id)
{
location.href = "ManageEcr.aspx?retUrl=<%=Request.Path %>&retText=Return to list&<%=Constants.QS_ECR_ID%>=" originalAttribute="href" originalPath="CreateEcr.aspx";
}

function ManageEcr(id)
{
location.href = "ManageEcr.aspx?retUrl=<%=Request.Path %>&retText=Return to list&<%=Constants.QS_ECR_ID%>=" originalAttribute="href" originalPath="CreateEcr.aspx";
}

function ManageEcr(id)
{
location.href="ManageEcr.aspx?retUrl=<%=Request.Path %>&retText=Return to list&<%=Constants.QS_ECR_ID%>=" originalAttribute="href" originalPath="ManageEcr.aspx?retUrl=<%=Request.Path %>&retText=Return to list&<%=Constants.QS_ECR_ID%>=" originalAttribute="href" originalPath="CreateEcr.aspx";
}

function ManageEcr(id)
{
location.href="ManageEcr.aspx?retUrl=<%=Request.Path %>&retText=Return to list&<%=Constants.QS_ECR_ID%>=" originalAttribute="href" originalPath="ManageEcr.aspx?retUrl=<%=Request.Path %>&retText=Return to list&<%=Constants.QS_ECR_ID%>=" originalAttribute="href" originalPath="ManageEcr.aspx?retUrl=<%=Request.Path %>&retText=Return to list&<%=Constants.QS_ECR_ID%>=" originalAttribute="href" originalPath="CreateEcr.aspx";
}

function ManageEcr(id)
{
location.href="ManageEcr.aspx?retUrl=<%=Request.Path %>&retText=Return to list&<%=Constants.QS_ECR_ID%>=" originalAttribute="href" originalPath="ManageEcr.aspx?retUrl=<%=Request.Path %>&retText=Return to list&<%=Constants.QS_ECR_ID%>=" originalAttribute="href" originalPath="ManageEcr.aspx?retUrl=<%=Request.Path %>&retText=Return to list&<%=Constants.QS_ECR_ID%>=" originalAttribute="href" originalPath="ManageEcr.aspx?retUrl=<%=Request.Path %>&retText=Return to list&<%=Constants.QS_ECR_ID%>=" + id;
}

// function ManageEcn(id)
// {
// location.href="ManageEcr.aspx?retUrl=<%=Request.Path %>&retText=Return to list&t=2&<%=Constants.QS_ECR_ID%>=" originalAttribute="href" originalPath="ManageEcr.aspx?retUrl=<%=Request.Path %>&retText=Return to list&t=2&<%=Constants.QS_ECR_ID%>=" originalAttribute="href" originalPath="ManageEcr.aspx?retUrl=<%=Request.Path %>&retText=Return to list&t=2&<%=Constants.QS_ECR_ID%>=" originalAttribute="href" originalPath="ManageEcr.aspx?retUrl=<%=Request.Path %>&retText=Return to list&t=2&<%=Constants.QS_ECR_ID%>=" originalAttribute="href" originalPath="ManageEcr.aspx?retUrl=<%=Request.Path %>&retText=Return to list&t=2&<%=Constants.QS_ECR_ID%>=" + id;
// }
</script>
</telerik:RadCodeBlock>
</asp:Content>

1 Answer, 1 is accepted

Sort by
0
Erjan Gavalji
Telerik team
answered on 25 Sep 2008, 01:44 PM
Hi Alan,

Could it be that you have a ScriptReference added to the RadScriptManager's Scripts collection? We identified a bug in RadScriptManager, happening after the installation of .NET Framework 3.5 SP1. We are working on finalizing that.

We will appreciate it if you are able to separate your scenario in a standalone simple website and send it to us via a formal support ticket. The application will help us verify that we are not missing something related to the bug fix.

Kind regards,
Erjan Gavalji
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
General Discussions
Asked by
Alan
Top achievements
Rank 1
Answers by
Erjan Gavalji
Telerik team
Share this question
or