PDA

View Full Version : Ext.get, after setContent on tab content - doc elements unavailable?



Saeven
21 Apr 2007, 8:35 AM
Hi,

I have a little question..

If I create a tab in a tabbed pane, and do a :


tab.setContent( '<div id="a1">abc</div>' );

The content is set just fine.

If I try to Ext.get the content that I added after that however, Prototype dies with an unavailable element type of error.


Ext.get( 'a1' ); // fails

Why is this?

Lastly, if I load the little div content into the tab through an Ajax call, then Ext.get works fine - I'd like to avoid this Ajax call if possible of course.

Any clarification appreciated.
Alex

tryanDLS
21 Apr 2007, 12:31 PM
Try looking at the rendered HTML in Firebug after setContent runs. Is the div being added? Maybe there's an issue with prototype updating the dom. Can you swap in the yui adapter and see if you get different results.