1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    36
    Vote Rating
    -2
    arpit2438735 is an unknown quantity at this point

      0  

    Default Unanswered: POST data didn't show any output in Sencha

    Unanswered: POST data didn't show any output in Sencha


    I making a small app related to playlist but when I save any data in PHP responsetext fail to show output as given in PHP file.
    Code:
    onSaveNoteCommand: function () {
        //console.log("onSaveNoteCommand");
       var noteEditor = this.getNoteEditorView();
        var currentNote = noteEditor.getRecord();
        var newValues = noteEditor.getValues();
        // Update the current note's fields with form values.
        currentNote.set("title", newValues.title);
        currentNote.set("duration", newValues.duration);
        currentNote.set("hidden",newValues.title);
        var errors = currentNote.validate();
          var notesStore = Ext.getStore("Saves");   
        notesStore.sync();
    
    
      },
    Save js file code
    Code:
    Ext.define("PlayListApp.store.Saves", {
        extend: "Ext.data.Store",
        config: {
            model: "PlayListApp.model.Play",
            proxy:{
                type:'ajax',
                url:'http://127.0.0.1/edit/saves.php',
                method:'GET',
                params:{title:"title"},
                success: function(e) {
                alert(e.responseText);
     
            },
            failure:function(e){
            }
            }
         }
    });
    fail to get any response on success or fail
    Model of play
    Code:
    Ext.define("PlayListApp.model.Play", {
        extend: "Ext.data.Model",
        config: {
            idProperty: 'id',
            fields: [
                { name: 'id', type: 'int' },
                { name: 'dateCreated', type: 'date', dateFormat: 'c' },
                { name: 'title', type: 'string' },
                { name: 'duration', type: 'int'},
                { name: 'hidden', type: 'string' }
            ],
            validations: [
                { type: 'presence', field: 'id' },
                { type: 'presence', field: 'dateCreated' },
                { type: 'presence', field: 'title', message: 'Please enter a link in playlist.' },
                { type: 'format', name: 'duration',matcher:/^[0-9]*$/, message:  'Please enter duration in playlist'},
                { type: 'length', name:'duration', min:'1', max:'3', message:'Please enter digit between 1 and 3'}
            ]
        }
    });
    PHP code
    <?php
    if(isset($_POST))
    {
    echo 'print'';
    }
    ?>

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,754
    Answers
    3462
    Vote Rating
    827
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      1  

    Default


    Check out the network tab in the developer tools in Chrome or Safari. Do you see the request? What method is it? Is it a GET?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Apr 2012
    Posts
    36
    Vote Rating
    -2
    arpit2438735 is an unknown quantity at this point

      -2  

    Default


    Very late reply Sir.I solve my own issue as I using ext.ajax.request on function onsavecommand.Thanks for reply.

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi