I wrote a sencha code for loading an Jsonp webservice. But now I am getting the Ext.Util.JSONP itself as undefined. So I could not able to make request. Please help me in loading the data. I hope ,I am not missing any reference. I can able see the Ext.data.Jsonp or Ext.Util.JSONP in the sencha-touch.js file.
Below is the code segment.Thanks in advance.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Hello Jersey</title>
<!-- <script src="lib/touch/sencha-touch.js" type="text/javascript"></script>
<link href="touch/resources/css/sencha-touch-debug.css" rel="stylesheet" type="text/css" />-->
<script src="touch/sencha-touch.js" type="text/javascript"></script>
<link href="touch/resources/css/sencha-touch.css" rel="stylesheet" type="text/css" />
<script type="text/jscript">
new Ext.application({
launch: function () {
" var itemTpl = new Ext.XTemplate([
'',
'',
'<tpl for=".">',
'',
'',
'',
'',
'',
'',
'
Date | Bill Number | Amount | |
---|
{Addr} | {Email} | £{State} |
',
]);"
var makeJSONPRequest = function () {
// panel.update('');
// panel.setLoading(true, true);
Ext.util.JSONP.request({
url: 'http://localhost/service/TRSDealerService.svc/GetMobileDealer?zip=28036&radius=100&limit=15',
callbackKey: 'callback',
callback: onCallback
});
};
var onCallback = function (result) {
// expecting result here..........
};
var button = Ext.create('Ext.Button', {
text: 'Button',
id: 'rightButton'
});
Ext.create('Ext.Container', {
fullscreen: true,
items: [
{
docked: 'top',
xtype: 'titlebar',
items: [
{
text: 'Load invoices',
handler: makeJSONPRequest
}
]
}
]
});
Ext.create('Ext.Panel', {
}).showBy(button);
}
});
</script>
</head>