Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User
    Join Date
    Mar 2012
    Location
    Tunisia
    Posts
    74
    Vote Rating
    1
    zied jouini is on a distinguished road

      0  

    Default Unanswered: consume a web service with sencha touch 1

    Unanswered: consume a web service with sencha touch 1


    SALAM,
    I want to consume a web service with sencha touch, here is my code but it doesnt work
    the result of the web service is
    {"Id":10,"NAME":"zied"}
    Code:
    var App = new Ext.Application({
        name: 'webservice',
        useLoadMask: true,
        launch: function ()
    {
    
    
    				   
       webservice.views.service = new Ext.Ajax.request({
                id: 'show',
                items: [{
                  xtype: 'panel',
                  id: 'JSONP',
                  url :'http://localhost:8732/Service1/data/10',
                  success : function(response) 
                    {
                     var user.Name = eval('('+ response.responseText+ ')');
                    }
                        }]
            });
    
    
    
    
    webservice.views.form = new Ext.extend(Ext.Panel, {
    scroll: 'vertical',
    items: [{
     xtype: 'form',
     id: 'form',
     fullscreen: true,
     cls : 'form',
     
    
    
        items: [
            {
                xtype: 'textfield',
                name : 'first',
                id: 'Nom',
                placeHolder: 'Nom',
            },
            {
                xtype: 'button',
                flex: 1,
                margin: 10,
                text: 'Envoyer', handler: function()
                             {
                              Ext.getCmp('Nom').setValue(webservice.views.service.user);
                             }
            }
               ]
    }]
        
    });
    
    
       
          webservice.views.Viewport = new Ext.Panel({
                fullscreen: true,
                layout: 'card',
                cardAnimation: 'slide',
                items: [webservice.views.form]
            });
    
    
    }
    });
    how can i fix this. thank youuu

  2. #2
    Sencha User
    Join Date
    Mar 2012
    Location
    Tunisia
    Posts
    74
    Vote Rating
    1
    zied jouini is on a distinguished road

      0  

    Default


    I also tried this code but it still does not work
    Code:
    App.views.Homeinfo = Ext.extend(Ext.Panel, {
    scroll: 'vertical',
    items: [{
     xtype: 'form',
     id: 'form',
     fullscreen: true,
     cls : 'form',
     
    
    
        items: [
            {
               xtype: 'fieldset',
               title: 'Demande d\'information',
               instructions:'Veuillez entrer les informations precedente',
            items: [
            {
                xtype: 'textfield',
                name : 'first',
                label: 'Nom',
                placeHolder: 'Nom',
            },
            {
                xtype: 'textfield',
                name : 'last',
                label: 'Prenom',
            placeHolder: 'Prenom',
            },
            {
            xtype: 'emailfield',
            name: 'Email',
            label: 'Email',
            placeHolder: 'me@example.com',
            useClearIcon: true
            },
            {
            xtype: 'numberfield',
            name: 'tel',
            label: 'Telephone',
            placeHolder: '00216-55-555-555',
            useClearIcon: true
            },
            {
                xtype: 'textfield',
                id: 'title',
                label: 'Objet',
                required: true
            },
            {
                xtype: 'textareafield',
                name: 'narrative',
                label: 'Demande'
            },
            ]},
            {
                xtype: 'button',
                flex: 1,
                margin: 10,
                text: 'Envoyer', handler: function()
                       {
                     alert("Demande envoye")
    
    
                      Ext.data.JsonP.request({
                      url : 'http://localhost:8732/Service1/data/10',
                      success : function(response) {
                            var obj = Ext.decode(response.responseText);
                        Ext.getCmp('title').setValue(obj);
                        alert("dooooooo somthing")
                         }
                                            });
                   
                        }
            }
        
     ]
    }]
        
    });
    Ext.reg('Homeinfo', App.views.Homeinfo);
    the web service is made with WCF
    thank you