We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

AutocompleteTextBox error in JS

Thread ID:

Created:

Updated:

Platform:

Replies:

102893 Mar 12,2012 09:52 AM Mar 23,2012 07:38 AM ASP.NET MVC (Classic) 11
loading
Tags: Tools
Administrator [Syncfusion]
Asked On March 12, 2012 09:52 AM

I created AutocompleteTextBox with ClientSideTemplate.

--------------------
CONTROLLER CODE
--------------------
public class HomeController : Controller
{
public ActionResult Index()
{
var myModel = new AutocompleteTextBoxModel
{
RequestMapper = "Home/GetTemplate",
ClientSideTemplate = "visitingCard",
JSONMode = true,
Mode = AutocompleteTextBoxModel.ModeType.Get
};

ViewData["myAutocomplete"] = myModel;
return View();
}

public JsonResult GetTemplate(string queryString)
{
var list = new List
{
new MyItem{ Id = 1, Name = "Test 1"},
new MyItem{ Id = 2, Name = "Test 2"},
new MyItem{ Id = 3, Name = "Test 3"},
new MyItem{ Id = 4, Name = "Test 4"},
new MyItem{ Id = 5, Name = "Test 5"}
};

var filteredData = from suggestion in list
where suggestion.Name.ToLower().StartsWith(queryString.ToLower())
select new
{
UiId = suggestion.Id,
UiName = suggestion.Name
};

return Json(filteredData, JsonRequestBehavior.AllowGet);
}
}

public class MyItem
{
public int Id;
public string Name;
}

--------------------
CHTML CODE
--------------------



  • {{UiName}}



@{ Html.Syncfusion().AutocompleteTextBox("myAutocomplete").Render(); }
--------------------

But when i type text in text field I have error
"
h is not a constructor
http://localhost:60845/Scripts/MicrosoftAjax.js
Line 5
"

Please see code in attach.

What am I doing wrong?



AutoComp_e6695134.zip

Administrator [Syncfusion]
Replied On March 12, 2012 09:53 AM

CHTML CODE
--------------------



  • {{UiName}}



@{ Html.Syncfusion().AutocompleteTextBox("myAutocomplete").Render(); }



Varalakshmi R.S [Syncfusion]
Replied On March 13, 2012 05:36 AM

Hi Mikhail,

Thanks for contacting Syncfusion forums.

We have checked the sample and found that the reference of MicrosoftAjaxTemplates script file is missing in _Layout.cshtml file. So we suggest you to include the following script reference to get rid of this issue.


MicrosoftAjaxTemplates script file should be available in scripts folder.



We have also modified the attached sample and the modified sample can be downloaded from the following link,
AutoComp_e6695134644579830.zip

Kindly try the sample and let us know if it works.

Thanks,
Varalakshmi




Administrator [Syncfusion]
Replied On March 13, 2012 06:41 AM

All works good. thanks.

But if I use jquery-1.7.1.min.js (before I used jquery-1.4.4.min.js) I have different error.

What Jquery srpipt version need use with Syncfusion components?



AutoComp_20120313_893ed2a9.zip

Varalakshmi R.S [Syncfusion]
Replied On March 14, 2012 02:06 AM

Hi Mikhail,

Thanks for the update.

We have checked your sample in our environment and we found no issues with the attached sample. The sample works fine without throwing any error. Currently, we are using jQuery 1.4 and jQuery-ui 1.8 in our code library and you can use any versions of script files with Syncfusion controls.

Thanks,
Varalakshmi



Administrator [Syncfusion]
Replied On March 14, 2012 03:11 AM

Hi Varalakshmi

When I open the list (click on the dropdown arrow in) and select one of the options I get the error.

In attach example for this.
In attach image with error



AutoComp_20120314_519ed341.zip

Varalakshmi R.S [Syncfusion]
Replied On March 15, 2012 08:29 AM

Hi Mikhail,

Thanks for sharing the details with us.

We just downloaded the attached sample and run the sample in our environment and we do not get any error when we click on dropdown button and select a item from the list. We have also recorded a video which showcase the behavior of the auto complete text box and the video can be downloaded from the following link,
auto1632580172.zip
Kindly refer the video and if the issue exists still could you please provide us a scenario to isolate this issue?

Regards,
Varalakshmi



Administrator [Syncfusion]
Replied On March 19, 2012 03:27 AM

Hello.
In the attached file, I made ​​a video of how I got the error.
Please see this.

All errors display on "console" tab in FF.



20130319 (code+video)_6bbfc300.zip

Varalakshmi R.S [Syncfusion]
Replied On March 19, 2012 08:10 AM

Hi Mikhail,

We regret to let you know that we are unable to download the sample which you provided in your previous update. Can you please share us the proper link to download the sample?

Regards,
Varalakshmi



Administrator [Syncfusion]
Replied On March 20, 2012 02:45 AM

Hello.

Please see file in attach.



20130319_bb98bf6e.zip

Varalakshmi R.S [Syncfusion]
Replied On March 20, 2012 03:06 AM

Hi Mikhail,

We are able to see the error in the console. Currently, we are working on this and will update more details regarding this error on 23'rd March,2012.

Thanks,
Varalakshmi


Varalakshmi R.S [Syncfusion]
Replied On March 23, 2012 07:38 AM

Hi Mikhail,

Thanks for your patience.

This issue occurs only when jQuery1.7 file is referenced and this is confirmed as a defect. Please create a new incident to get the patch for this issue fix.

Regards,
Varalakshmi



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;