Results 1 to 2 of 2

Thread: Sencha Standalone ScriptTag

  1. #1
    Sencha User
    Join Date
    Apr 2011
    Posts
    8
    Vote Rating
    0
      0  

    Question Sencha Standalone ScriptTag

    Was having some cross-domain jsonp headaches and came across this old thread.

    I was also looking for a standalone (not connected to a store) example like gkassyou in that post and am confused by gkassyou's post asking for one, and then immediately after Animal's post saying he has the TreeLoader code, did I miss something?

    I'm looking to implement it inside a Sencha app.

    L

  2. #2
    Sencha User
    Join Date
    Jun 2011
    Posts
    93
    Vote Rating
    3
      0  

    Default

    Something like this? you can update a panel using its update method, no store needed. Or, you can do whatever you like with the returned data........

    Code:
    function getSomeJSONP(){
       Ext.util.JSONP.request({
          url: 'your jsonp service url here',
          callbackKey: 'callback', // no need to change this
             params: {
                someParam1:'value', // whatever you need to be passing... usually a login or session key...
                someParam2:'value'
              },
              callback: function(data) {
                 if (!data){
                    Ext.Msg.alert('Failed to get data');
                 } else {
                      // do whatever you like with the returned data object
                      yourResultPanel.update(data); // if your panel has a template, this will update it
                  }
             }
       });// end JSONP request
    }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •