public/javascripts/inputex/js/rpc/inputex-rpc.js
function(url, callback) {
      
      // TODO: if url is not in the same domain, we should use jsonp !
      util.Connect.asyncRequest('GET', url, { 
         success: function(o) {
            try {
               this._smd = lang.JSON.parse(o.responseText);
               this.process(callback);
            }
            catch(ex) {
               if(lang.isObject(console) && lang.isFunction(console.log))
                  console.log(ex);
               if( lang.isFunction(callback.failure) ) {
                  callback.failure.call(callback.scope || this, {error: ex});
               }
            }
         }, 
         failure: function(o) {
            if( lang.isFunction(callback.failure) ) {
               callback.failure.call(callback.scope || this, {error: "unable to fetch url "+url});
            }
         },
         scope: this
      });
   }
function(url, callback) {
      
      // TODO: if url is not in the same domain, we should use jsonp !
      util.Connect.asyncRequest('GET', url, { 
         success: function(o) {
            try {
               this._smd = lang.JSON.parse(o.responseText);
               this.process(callback);
            }
            catch(ex) {
               if(lang.isObject(console) && lang.isFunction(console.log))
                  console.log(ex);
               if( lang.isFunction(callback.failure) ) {
                  callback.failure.call(callback.scope || this, {error: ex});
               }
            }
         }, 
         failure: function(o) {
            if( lang.isFunction(callback.failure) ) {
               callback.failure.call(callback.scope || this, {error: "unable to fetch url "+url});
            }
         },
         scope: this
      });
   }
function ( url , callback ) { // TODO: if url is not in the same domain, we should use jsonp ! util . Connect . asyncRequest ( 'GET' , url , { success : function ( o ) { try { this . _smd = lang . JSON . parse ( o . responseText ) ; this . process ( callback ) ; } catch ( ex ) { if ( lang . isObject ( console ) && lang . isFunction ( console . log ) ) console . log ( ex ) ; if ( lang . isFunction ( callback . failure ) ) { callback . failure . call ( callback . scope || this , { error : ex } ) ; } } } , failure : function ( o ) { if ( lang . isFunction ( callback . failure ) ) { callback . failure . call ( callback . scope || this , { error : "unable to fetch url " + url } ) ; } } , scope : this } ) ; }
Download the SMD at the given url
@method fetch
@param {String} Absolute or relative url
Download the SMD at the given url