tags:

views:

219

answers:

3

How can I dynamically set a tab index in ExtJS? I can't see anything in the docs for it, only a config option for it. If I try to do an .apply, it still doesn't work. I know I can probably extend the framework to support this since it is just a DOM element, but I'm sure I'm missing something simpler. Help?

A: 

See the setActiveTab method of a tabPanel, which accepts either a string (id of the tab element) or an integer.

Drasill
Sorry, I'm not talking about a tabPanel. I'm talking about the tab index for navigating through a page with the "tab" button.
extnoob
So sorry ;)I would answer like J.Barrows.
Drasill
+1  A: 

It seems that in the extjs code for field they do this:

this.el.dom.setAttribute('tabIndex', this.tabIndex);
Jim Barrows
A: 

you can use the set method of the Element class which you can retrieve using the get method, so something like this: Ext.get('YOURELEMENTID').set({tabIndex:5});

SBUJOLD