onContentLoaded. Focus textbox in a tab

I have the following situation.

I open a windows from the main page.

This windows cotains a tabbar component with textboxs inside a form.

I’d like to focus the first text box using onContentLoaded but it doesn’t work when te componet is inside the tabbar beuse it says that the tabbar isn’ completely loaded.

Here is my code.



dhxWins.attachEvent(“onContentLoaded”, function(win) { //focus en el primer text_box enabled


        if (_isIE && win.getId() == “w1”) {                







Your code:

<INPUT size=“10” type=“text” name=“txt_Codigo” id=“txt_Codigo” maxlength=“2” disabled >

Input is disabled so cannot be in focus.

I have a function which change the state to enabled. It depends if it is new, open or delete.

But same thing happens with txt_Nombre which is allways enabled.

All works fine. Here is a demo.

(input enabled, launch attach_url2.html file)

demo.zip (1.09 KB)