Hi
I've got the URL below which always returns a single record. How do I return the Content field and update the html of a div on the page?
http://dsdmservices.azurewebsites.net/dsdmRest.svc/GetContent?BookMenuID=4
Returns:
{"BookMenuID":4,"Content":"<span>DSDM advocates........"}
I've tried the code below so far (amongst many others) but the alert shows "undefined" as the result...
Cheers
Cliff
I've got the URL below which always returns a single record. How do I return the Content field and update the html of a div on the page?
http://dsdmservices.azurewebsites.net/dsdmRest.svc/GetContent?BookMenuID=4
Returns:
{"BookMenuID":4,"Content":"<span>DSDM advocates........"}
I've tried the code below so far (amongst many others) but the alert shows "undefined" as the result...
var dataSource = new kendo.data.DataSource({ transport: { read: { url: "http://dsdmservices.azurewebsites.net/dsdmRest.svc/GetContent?BookMenuID=4", // the remove service url dataType: "jsonp" // JSONP (JSON with padding) is required for cross-domain AJAX } } }); dataSource.read(); alert(dataSource.length); var dataItem = dataSource[0]; $('#divContent').html(dataItem.Content);Cheers
Cliff