30. Januar 2013 12:01
// Hilfsfunktion
// ruft den OData Service per Ajax Request auf
// Parameter: OData Filter Query string
// Callbackfuntion
function ODataAjaxServiceRequest(filter, callbackFunction) {
var oDataPath = GetODataPath();
var retrieveReq = new XMLHttpRequest();
var Odata = oDataPath + filter;
retrieveReq.open("GET", Odata, false);
retrieveReq.setRequestHeader("Accept", "application/json");
retrieveReq.setRequestHeader("Content-Type", "application/json; charset=utf-8");
retrieveReq.onreadystatechange = function () { callbackFunction(this); };
retrieveReq.send();
}
1. Februar 2013 18:24
4. Februar 2013 19:53