netresource salam.
i tryed this code but without success.
my url to my web service is "http://localhost:8732/log/log/admin/pass/admin" i made it with restful WCF . and its returning tha name of the client
here is what i did in my form sencha 1
Code:
App.views.BankingLogin = Ext.extend(Ext.Panel, {
scroll: 'vertical',
items: [{
xtype: 'formpanel',
id: 'form',
fullscreen: true,
cls : 'form',
items: [
{
xtype: 'fieldset',
title: 'Sign In',
},
{
xtype: 'textfield',
id : 'Login',
label: 'Login*',
placeHolder: 'login',
},
{
xtype: 'passwordfield',
id: 'password',
label: 'Password*',
useClearIcon: true,
placeHolder: 'password',
},
{
xtype: 'panel',
defaults: {
xtype: 'button',
style: 'margin: 0.1em',
flex: 1
},
layout: {
type: 'hbox'
},
items: [{
text: 'Valider',
handler: function() {
if (Ext.getCmp('Login').getValue() == '') {
Ext.Msg.alert('Impossible de se connecte', 'Login vide');
}
if (Ext.getCmp('password').getValue() == '') {
Ext.Msg.alert('Impossible de se connecte', 'mot de passe vide');
}
if (Ext.getCmp('password').getValue() == '' && Ext.getCmp('Login').getValue() == '') {
Ext.Msg.alert('Impossible de se connecte', 'Login & mot de passe vide');
}
if (Ext.getCmp('password').getValue() != '' && Ext.getCmp('Login').getValue() != '')
{
Ext.util.JSONP.request({
url: 'http://localhost:8732/log',
params: {
log: admin,
pass: admin
},
callback: function(data) {
Ext.Msg.alert("Bienvenue ",data);
}
});
}
}
}]
},
]
}]
});
Ext.reg('BankingLogin', App.views.BankingLogin);
my target is to make a cross mobile app so i used JSONP, but when i test it in my browser it doesnt work.
can you correct me the code please.
thank you