Defer not working? Or am I doing something wrong?

January 7th, 2009
  • Ext.onReady(function() {
    Ext.get('name').on('change', function(){
    var msg = Ext.get("msg");
    msg.load({
    url: 'ajax_response.asp',
    params: "name=" + escape(Ext.get('name').dom.value),
    text: "Updating..."
    });
    msg.show();
    msg.highlight();
    msg.defer(30000, Ext.get("msg").hide());
    //msg.hide();
    });
    });

    I can't get the defer to work and I think I have tried every different way.

    Any ideas?

    Thanks,

    Michael


  • I tried the following

    msg.hide.defer(3000);

    And the error I am getting states that the object does not support his property method.

    Any other options I can try?

    Thanks,

    Michael


  • Try stepping through the code in Firebug.

    At the line where the error happens, look at the value of all the variables.

    Mousing over the variables in the code also shows their values.

    So, with that powerful tool, what is the content of the msg variable at the error line?


  • There are a couple free debuggers for IE, and a stripped down version of Firebug. Do a search here -they've been discussed before. Also, when something works in FF, but not in IE, the first thing to check for is an extra comma somewhere.


  • I think you want something like:
    msg.hide.defer(30000)


  • Funny thing is that the error only occurs in IE. Firefox it seems to run properly! Any ideas on how do debug IE (similar to firebug?)

    Thanks,

    Michael


  • In Tools - Internet Options - Advanced Tab there is an option called:

    Disable Script Debugging (Internet Explorer)

    Uncheck this, when you get an error it will ask if you want to debug.

    Not sure if this option requires some MS product to work - it uses .net for me so you may have to have .net loaded not sure.

    Hope that helps.


  • I found that most errors in IE also show in Opera, and Opera has a much nicer Javascript console. That may help. Not as powerful as firebug, but more like the standard Javascript console in FF. Still better than IE's error reporting.







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about Defer not working? Or am I doing something wrong? , Please add it free.