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

Error jQuery was not called

1 Answer 732 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Akshay
Top achievements
Rank 1
Akshay asked on 04 Feb 2013, 05:12 PM
Calling the jsonp response but receiving Error : jQuery18207158344800118357_1359997121430 was not called. can some one let me know how to fix this ? Appreciate your help. Below is the client code :

<script>
        function mobileListViewPullToRefresh() {
        var dataSource = new kendo.data.DataSource({
serverPaging: true,
    pageSize: 2,
type: "odata",
error: function(e) {
console.log("Error " + e);
alert(e.errorThrown);
   },
    transport: {
    read: {
                   url: "http://localhost:50675/movie/GetAll", 
                       dataType: "jsonp"
                       },
                       parameterMap: function(options) {
            alert("Inside parameterMap")
            alert(JSON.stringify(options, null, 4));
                       return {
                           q: "javascript",
                           page: options.page,
                           rpp: options.pageSize,
                       };
                      }
                 },
                 schema: {
        errors: function(response) {
       return response.errors;
   },
data: function(data) {
                    if (data.movieList.length == 0) {
    return [];
    }
return data.movieList;
       },
       total: function(data) {
        alert(data.movieList.length);
                           return data.movieList.length;
                       }
              }
});

$("#localListView").kendoMobileListView({
           dataSource: dataSource,
           pullToRefresh: true,
           appendOnRefresh: true,
           template: $("#categories-template").html(),
           pullParameters: function(item) {
            alert("Inside pullParameters")
            alert(item.length);
            alert(JSON.stringify(item, null, 4));
               return {
                   page: 1
                };
            }
       });
       };
       
       window.kendoMobileApplication = new kendo.mobile.Application(document.body);
    </script>

When checked in Chrome developer tools the response is successfully received from server. Below is the jsonp response from the server :

({"movieList":[{"ID":1,"Title":"Movie","ReleaseDate":"/Date(487189800000)/","Genre":"Comedy","Price":30},{"ID":1,"Title":"Movie","ReleaseDate":"/Date(487189800000)/","Genre":"Comedy","Price":30}],"count":4})

1 Answer, 1 is accepted

Sort by
0
Petyo
Telerik team
answered on 05 Feb 2013, 08:25 AM
Hi Akshay,

There is a difference between json and jsonp formats - please refer to this stack overflow thread for more details.

Kind regards,
Petyo
the Telerik team
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
Akshay
Top achievements
Rank 1
Answers by
Petyo
Telerik team
Share this question
or