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

      0  

    Default google gecoding service and cross domain requests

    google gecoding service and cross domain requests


    Hi,

    I'm using google geocoding service as described here:

    In the example the url for the request is:
    Code:
    http://maps.google.com/maps/geo?output=json&...&callback=_xdc_._1fsm2u0k2
    and the response:
    Code:
    _xdc_._1fsm2u0k2 && _xdc_._1fsm2u0k2({
      "name": "1600 Amphitheatre Pky, Mountain View, CA",
      "Status": {
      ...
      ...
      ...
        }
    )
    I understand how cross domain requests and ScriptTagProxy works but I don't understand why google respond with:
    Code:
    _xdc_._1fsm2u0k2 && _xdc_._1fsm2u0k2({...
    and not with:
    Code:
    _xdc_._1fsm2u0k2({...
    Any ideas?

    Thanks

  2. #2
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,498
    Vote Rating
    46
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    It's a truth test.

    The statement will not execute unless _xdc_._1fsm2u0k2 exists

    Type the following into the Firebug console:

    Code:
    function f(){alert(1);}
    then

    Code:
    undefined && f()
    You see that the function is not run.

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

      0  

    Default


    That's interesting.

    Couldn't this improve the following code in scriptTagProxy:
    Code:
    // private
        destroyTrans : function(trans, isLoaded){
            this.head.removeChild(document.getElementById(trans.scriptId));
            clearTimeout(trans.timeoutId);
            if(isLoaded){
                window[trans.cb] = undefined;
                try{
                    delete window[trans.cb];
                }catch(e){}
            }else{
                // if hasn't been loaded, wait for load to remove it to prevent script error
                window[trans.cb] = function(){
                    window[trans.cb] = undefined;
                    try{
                        delete window[trans.cb];
                    }catch(e){}
                };
            }
        },
    In case of a timeout failure the check if the function exist is not necessary.

    Could this be a feature request?

    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..."