cors - ODATA and $getJSON - SyntaxError: missing ; before statement -


i consuming odata service under development , running locally. getting consumed jquery using below code. javascript rendered nintex form hosted in sharepoint environment in different domain.

browser used testing 'firefox'

    var url = "http://localhost:57368/odata/employeesleaves('340674')";      $.getjson(url + "?callback=?", function (data) {        alert('coming...');     }); 

i can see json object in firebug/firefox, error in console 'syntaxerror: missing ; before statement "odata.metadata":"http://localhost:57368/odata/$metadata#employeesleaves/@el'

any highly appreciated!

thanks

neeraj matta

the webapi service been accessed, cors not enabled on it.

below link enabling cors on web service.

http://www.asp.net/web-api/overview/security/enabling-cross-origin-requests-in-web-api


Comments

Popular posts from this blog

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -

YouTubePlayerFragment cannot be cast to android.support.v4.app.Fragment -