1. #11
    Sencha User
    Join Date
    Jun 2008
    Posts
    31
    Vote Rating
    0
    alexandern is on a distinguished road

      0  

    Default


    Quote Originally Posted by tanajura View Post
    Very good!
    Try this example zip atached.
    tks
    Really cool, but I am having issues with IE 6 ( unfortunately ) .. Die IE6! Die!!!

  2. #12
    Sencha User
    Join Date
    Jun 2008
    Posts
    31
    Vote Rating
    0
    alexandern is on a distinguished road

      0  

    Default Nice indeed

    Nice indeed


    Thank you, this worked with IE6 and Safari...

    Quote Originally Posted by Iorek View Post
    Here's another approach to achieve this:

    Code:
    Ext.ux.OnDemandLoadByAjax = function(){
    
        loadComponent = function(component, callback){
            handleSuccess = function(response, options) {
                var type = component.substring(component.lastIndexOf('.'));
                var head = document.getElementsByTagName("head")[0];
                if (type === ".js") {
                    var js = document.createElement('script');
                    js.setAttribute("type", "text/javascript");
                    js.text = response.responseText;
                    if (!document.all) {
                        js.innerHTML = response.responseText;
                    }
    
                    head.appendChild(js);
                }
    
                if(typeof callback == "function"){
                    if(document.all) {
                        callback();
                    } else {
                        callback.defer(50);
                    }
                };
            };
    
            handleFailure = function(response, options) {
                alert('Dynamic load script: [' + component + '] failed!');
            };
    
            Ext.Ajax.request({
                url: component,
                method: 'GET',
                success: handleSuccess,
                failure: handleFailure,
                disableCaching : false
            });
        };
    
        return {
            load: function(components, callback){
                Ext.each(components, function(component){
                    loadComponent(component, callback);
                });
            }
        };
    }();

  3. #13
    Ext User
    Join Date
    Nov 2008
    Posts
    1
    Vote Rating
    0
    oletros is on a distinguished road

      0  

    Post Ext.ux.OnDemandLoadByAjax with multiples callbacks

    Ext.ux.OnDemandLoadByAjax with multiples callbacks


    Hi !
    Modified Ext.ux.OnDemandLoadByAjax to permit multiple callbacks, one on each script or
    no callback, and no check of script extension (php, js, anything).

    Code:
    /** begin of code **/
    Ext.ux.OnDemandLoadByAjax = function() {
        loadComponent = function(component) {
            var sURL = null;
            var sCALLBACK = null;
    
            if (typeof component === "string") {
                sURL = component;
            } else if (typeof component === "object") {
                sURL = component[0];
                sCALLBACK = component[1];
            }
    
            handleSuccess = function(response, options) {
                var head = document.getElementsByTagName("head")[0];
                var js = document.createElement('script');
                js.setAttribute("type", "text/javascript");
                js.text = response.responseText;
                if (!document.all) {
                    js.innerHTML = response.responseText;
                }
    
                head.appendChild(js);
                if (typeof sCALLBACK == "function") {
                    if (document.all) {
                        sCALLBACK();
                    } else {
                        sCALLBACK.defer(50);
                    }
                }
            }
    
            handleFailure = function(response, options) {
                alert('Dynamic load script: [' + sURL + '] failed!');
            }
    
            Ext.Ajax.request({
                url: sURL ,method: 'GET' ,success: handleSuccess ,failure: handleFailure ,disableCaching : false
            });
    
        }
        
        return {
            load: function(components) {
                Ext.each(components, function(component) {
                    loadComponent(component);
                });
            }
        }
    }();
    
    /** end of code **/
    
    /** example of use, one callback only **/
    var oScripts = [
        'dependence1.js', 'dependence2.js', [ 'script.php', function(options) {
                alert('this is a callback after script.php');
            }
        ]
    ];
    Ext.ux.OnDemandLoadByAjax.load(oScripts);
    
    
    /** example of use, multiples callbacks **/
    var oScripts = [
        [ 'script1.php', function(options) {
                alert('this is a callback after script1.php');
            }
        ] ,[ 'script2.php', function(options) {
            alert('this is a callback after script2.php');
            }
        ]
    ];
    
    Ext.ux.OnDemandLoadByAjax.load(oScripts);
    Thanks
    Last edited by mystix; 17 Mar 2009 at 7:00 PM. Reason: POST CODE IN [CODE][/CODE] TAGS. see http://extjs.com/forum/misc.php?do=bbcode#code

  4. #14
    Sencha User LoriSun's Avatar
    Join Date
    Jan 2009
    Location
    China, Dalian
    Posts
    29
    Vote Rating
    1
    LoriSun is on a distinguished road

      0  

    Smile


    Hi oletros,

    Thanks for your effort, feel free to make upgrade on it.
    孩儿他爹

  5. #15
    Sencha User
    Join Date
    Mar 2008
    Posts
    566
    Vote Rating
    0
    moegal is on a distinguished road

      0  

    Default


    LoriSun,

    these are password protected files. 3 .xml and 1 .properties

    ?

    Marty

  6. #16
    Sencha User
    Join Date
    Mar 2008
    Posts
    566
    Vote Rating
    0
    moegal is on a distinguished road

      0  

    Default


    I am getting the same thing. Password protected xml files.

    Sorry, not sure what is going on here.

    Marty

  7. #17
    Ext User
    Join Date
    Jul 2009
    Posts
    2
    Vote Rating
    0
    Hristina is on a distinguished road

      0  

    Default Invoke method from one js file in another js file

    Invoke method from one js file in another js file


    I have something like this
    ONE.JS
    ...
    select: function(obj) {
    ...
    }
    ...
    and I want to invoke this function in another js file,but I do not know how to manage that
    For Example
    TWO.JS
    ...
    if(condition){
    ...
    select: function(obj)
    ...
    }
    ...
    Something like that!
    Thanks

  8. #18
    Sencha User LoriSun's Avatar
    Join Date
    Jan 2009
    Location
    China, Dalian
    Posts
    29
    Vote Rating
    1
    LoriSun is on a distinguished road

      0  

    Default Personal File.

    Personal File.


    Thanks, If any concern just send me the email.
    孩儿他爹

  9. #19
    Ext User
    Join Date
    Jun 2009
    Posts
    16
    Vote Rating
    0
    mpelzsherman is on a distinguished road

      0  

    Default


    Do either of these solutions work in IE7?

  10. #20
    Sencha User
    Join Date
    Jul 2011
    Posts
    49
    Vote Rating
    0
    zakif is on a distinguished road

      0  

    Default


    Dear LoriSun,

    I have find your solution might be useful for my problem (Loaded Tab Panel js only when needed).

    But I still don't get it. Would you like please to share some tutorial on implementing your solution.

    Thanks in advance.

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar