html ajax / jquery get JSON data from remote server using JSONP/JSON -


i use jqchart plugin display charts on mobile devices, html file resides on mobile device.

the server takes in 2 parameters this

  http://somedomain:15025/service1.svc/storewise_sales_qty_asp/{param1},{param2} 

and displays json response.

here part of html code

<script lang="javascript" type="text/javascript">         $(document).ready(function () {             $('#jqchart').jqchart({                 title: { text: 'binding remote data' },                 animation: { duration: 1 },                 shadows: {                     enabled: true                 },                 datasource: {                     ajax: {                         type: "post",                         url: "http://somedomain:15025/service1.svc/storewise_sales_qty_asp/26670,26770",                 contenttype:"application/json",                         datatype: 'jsonp',             crossdomain:true,                         data: "",                     }                 },                 series: [                     {                         type: 'column',                         xvaluesfield: {                             name: 'store',                             type: 'string' // string, numeric, datetime                         },                         yvaluesfield: 'qty'                     }                 ]             });         });     </script> 

when try access html file. goes blank. data not received or something. new j query , java. do.


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -