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

SCRIPT28: Out of stack space

2 Answers 136 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jon
Top achievements
Rank 1
Jon asked on 18 Jun 2013, 06:00 PM
I am currently evaluating these controls for use with our Hot
Towel/SPA-based application. I am attempting to display a drop down list
with data from our backend. I've attempted to do this with ComboxBox
and DropDownList, and both controls give me a "SCRIPT28: Out of stack
space" error.

I saw one post that said this was due to an older
version of jquery, but I'm using 1.9.1. The data is returned as a JSON
array. I set up the control in the viewAttached function:

function viewAttached(view) {
 
    $('#warehouseId').kendoDropDownList({
        autoBind: false,
        dataTextField: 'WHNAME',
        dataValueField: 'HOUSEO'
 
    });
Then in the same function, I retrieve the data:
aplusAdapter.getWarehouses(0, false, function (warehouseData) {
    //var ds = new kendo.data.DataSource({ data: warehouseData });
    var ddList = $('#warehouseId').data('kendoDropDownList');
    ddList.setDataSource(warehouseData);
    ddList.refresh();
 
});
warehouseData comes back from the controller, and contains valid data, including the WHNAME and HOUSEO fields. The dropdown list control appears to be empty. When I click on it, I get the spinning progress indicator, and the SCRIPT28 error appears. In Firefox, I get a "too much recursion" error.

What am I missing?

2 Answers, 1 is accepted

Sort by
0
Jon
Top achievements
Rank 1
answered on 19 Jun 2013, 12:11 PM
I note that if I copy the data into a temporary array with just a couple of fields, the control works correctly. Is the issue that my entity has too many fields? What is the limit?

Adding this makes it work:

$.each(warehouseData, function (index, value) {
    temp.push({
        "WHNAME": value.WHNAME,
        "HOUSEO": value.HOUSEO
    });
});

var ddList = $('#warehouseId').data('kendoDropDownList');
ddList.setDataSource(temp);
ddList.refresh();
0
Petur Subev
Telerik team
answered on 20 Jun 2013, 02:47 PM
Hello Jon,

Whats that JSON that is returned from the server, which you initialize new dataSource with, can you share it with us so we can see if we can reproduce the exception?

Kind Regards,
Petur Subev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
General Discussions
Asked by
Jon
Top achievements
Rank 1
Answers by
Jon
Top achievements
Rank 1
Petur Subev
Telerik team
Share this question
or