Talk:XForms/Horizontal File Tab Menu Highlighted

I suggest to use the following techinque

    Tab1       Объект   <xf:toggle case="page_2"/> </xf:action> </xf:trigger> </xf:case> <xf:case id="tab_2"> <xf:trigger appearance="minimal" class="tab"> <xf:label>Tab1</xf:label> <xf:action ev:event="DOMActivate"> <xf:toggle case="tab_1"/> <xf:toggle case="page_1"/> </xf:action> </xf:trigger> <xf:trigger appearance="minimal" class="tab" active=""> <xf:label>Объект</xf:label> <xf:action ev:event="DOMActivate"> <xf:toggle case="tab_2"/> <xf:toggle case="page_2"/> </xf:action> </xf:trigger> </xf:case> </xf:switch> </html:div>

<html:div class="pages"> <xf:switch> <xf:case id="page_1"> <html:div class="page page_1"> 1111111111111111111	</html:div> </xf:case> <xf:case id="page_2"> <html:div class="page page_2"> 2222222222222222222	</html:div> </xf:case> </xf:switch> </html:div>

and specifying different look in CSS for

xf|trigger.tab { /* vanilla tab */ ... } xf|trigger.tab[active] { /* current tab */ ... }

That way the first tab and page are selected by default.

-- Vladimir Dronnikov dronnikov@gmail.ru

Automatically selecting the first tab.
I found this example extremely helpful. To get around the problem of automatically selecting the first tab, I just added the following to my element:

onload="window.location = '#tab1';"

From a practical standpoint it's a simple workaround until something better comes along.