Home | Mail | Syndicate

welcome to my space

12 March, 2010 |

How do I retrieve div's found in tabPanel autoLoaded content?

  • Hi,

    I've started experimenting with Ext.js earlier this week, and absolutely love it. I am however encountering a few newbie obstacles, and I'm having little luck searching the forum and documentation for an answer.

    I'm using an Ext.Viewport with a tabPanel attached to it. There are four tabs in the panel, each using autoload to retrieve an HTML-formatted document. This works perfectly.

    Which brings me to my question:

    How do I reach into a tab panel's autoloaded content to perform some action against a div found in that content? Even something as simple as changing the div background color? I can successfully retrieve say a tab's title using Ext.getCmp and then referencing the returned object's title attribute, but I can't seem to be able to dive into the div's of the HTML-formatted document which is otherwise successfully being rendered to that panel.

    Any pointers greatly appreciated!!

    Jason


  • when are you running this code, relative to when the autoload happens? it may be that the content has not yet rendered.


  • Hi,

    I guess this is where my confusion stems from, because I've tried to use Ext.get and .on like so:
    var chapter;
    chapter = Ext.get('content');
    chapter.on('click', onClick);
    chapter.on('mousedown', cancelSelection);
    chapter.on('selectstart', cancelSelection);

    However when the script executes, I get the Firebug message:

    "chapter has no properties"

    My actual autoloaded HTML file is much larger, but suppose it looks like this:

    hello world


  • same way you would manipulate any other piece of the dom tree; use Ext.get or some other dom query method.







  • #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 How do I retrieve div's found in tabPanel autoLoaded content? , Please add it free.
    PNNL, SGI Think Big Danes Launch Europe's First 24-Hour Internet TV Station