Click here to Skip to main content
15,921,959 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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=".">',
'',
'',
'',
'',
'',
'',
'
DateBill NumberAmount
{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>
Posted
Updated 7-Apr-14 1:29am
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900