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

[Solved] Upgrade to 2011.1.315 and javascript textbox error

2 Answers 30 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Bronwyn
Top achievements
Rank 1
Bronwyn asked on 22 Mar 2011, 05:42 PM
Hi,

I just upgrade my Telerik ASP.NET MVC extensions to 2011.1.315 and I am receiving the following javascript error in telerik.textbox.min.js while trying to use a generic textbox control:


Here is the code in my view:

@using Telerik.Web.Mvc.UI
<html>
	<head>		
		<script type="text/javascript" src="@Url.PortalContent("/Scripts/jquery-1.4.4.min.js")"></script>
	</head>
	<body>
		<div>			
			@(Html.Telerik().IntegerTextBox()
				.Name("textbox")
				.MinValue(1)
				.MaxValue(25)
				.IncrementStep(1)
				.Value(3))
		</div>		
	</body>
</html>
@Html.Telerik().ScriptRegistrar().jQuery(false)

I initially tried it without adding jquery-1.4.4.min.js and setting Html.Telerik().ScriptRegistrar().jquery(true), however, I got the error that it couldn't find jquery-1.4.4.min.js, so that is why I had to add it.  Any insight would be great.  Thanks.

Bronwyn

2 Answers, 1 is accepted

Sort by
0
Accepted
Georgi Krustev
Telerik team
answered on 23 Mar 2011, 10:13 AM
Hello Bronwyn,

 
The aforementioned exception will be thrown if the element which is not an input element of type text. I suppose that the assembly Telerik.Web.Mvc.dll which is referenced in the project is older than v2011.1.315. Please verify that the correct assembly is used. Also check this online demo which shows how to use NumericTextBox component.

As a side note, we have introduced breaking changes in the HTML rendering of the NumericTextBox components. Check this help topic for more information.

All the best,
Georgi Krustev
the Telerik team
0
Bronwyn
Top achievements
Rank 1
answered on 23 Mar 2011, 03:20 PM
Thanks so much for the help!  This worked perfectly.  My project was referencing the old version of the Telerik.Web.Mvc dll. 

Best,

Bronwyn
Tags
General Discussions
Asked by
Bronwyn
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Bronwyn
Top achievements
Rank 1
Share this question
or