1. #1
    Sencha User
    Join Date
    Mar 2007
    Posts
    580
    Vote Rating
    0
    dolittle is an unknown quantity at this point

      0  

    Default passing arguments to failure callback on ajax call

    passing arguments to failure callback on ajax call


    Hi,

    I want to pass the connection object itself as an additional argument to the failure callback.
    I`ve tried this:
    Code:
    con.request({
        xmlData: xmlMessage, 
        failure: function(responce, options, myArg){
             alert(myArg);
        }
    });
    But it says that myArg is undefined.
    How can I do it?

    Thanks

  2. #2
    Sencha - Community Support Team hendricd's Avatar
    Join Date
    Aug 2007
    Location
    Long Island, NY USA
    Posts
    5,962
    Vote Rating
    10
    hendricd will become famous soon enough hendricd will become famous soon enough

      0  

    Default


    Check out the createDelegate docs. It provides what you want.

    Code:
    con.request({
        xmlData: xmlMessage, 
        failure: function(responce, options){
             console.log(this); //this == con
        }.createDelegate(con)
    });
    or..
    Code:
    con.request({
        xmlData: xmlMessage, 
        failure: function(responce, options, connection){
             console.log([this,connection]); //this == connection == con
        }.createDelegate(con,[con],true)      //append to end of arguments
    });
    "be dom-ready..."
    Doug Hendricks

    Maintaining ux: ManagedIFrame, MIF2 (FAQ, Wiki), ux.Media/Flash, AudioEvents, ux.Chart[Fusion,OFC,amChart], ext-basex.js/$JIT, Documentation Site.


    Got Sencha licensing questions? Find out more here.


  3. #3
    Sencha User
    Join Date
    Mar 2007
    Posts
    580
    Vote Rating
    0
    dolittle is an unknown quantity at this point

      0  

    Default


    I`ll try it.
    Thanks

Thread Participants: 1

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