Your Location is: Home > Jquery

ria services + jquery

From: Copenhagen View: 1765 ios_user 

Question

I have used ria.js and upshot but I get the same error in jquery:

object is undefined

This error is thrown from jQuery on line 630, inside

each:function
--> length = object.length

My javascript can call the domainservice and have the json response, and in the debugger I have this response:

{
    "GetTodoItemsResult": {
        "TotalCount": 4,
        "RootResults": [{
            "IsDone": false,
            "Title": "Todo item 1",
            "TodoItemId": 1
        }, {
            "IsDone": false,
            "Title": "Todo item 2",
            "TodoItemId": 2
        }, {
            "IsDone": false,
            "Title": "Todo item 3",
            "TodoItemId": 3
        }, {
            "IsDone": false,
            "Title": "Todo item 4",
            "TodoItemId": 4
        }]
    }
}

Best answer

i got it ! just add transmitMetadata="true" in web.config :