Thursday, May 8, 2008

Tabs


Description


The purpose of this article is to provide an in depth look of how Microsoft's CRM handles tab navigation throughout its Entity forms.


Before we get started, we should take a look at how CRM renders these tabs.


Code


<span tabIndex=0 class="tab" ID="tab0Tab" tabID="tab0">
Tab Name
</span>

A tab is nothing more than a span element with css properties defined in the span.tab class. Taking a look at the attributes, each tab is given an ID attribute with value tab[i]Tab where i is between 0 and 7 (only a max of 8 tabs are supported).


We can use this information to hide an entire tab of data. This can be done by using the display property of the element's style attribute. For simplicity's sake, the code below will hide the first tab within the entity form.

Code

      tab0Tab.style.display = "none";



Likewise, we can use the information presented above to display a hidden tab.

Code

      tab[i]Tab.style.display = "inline";

1 comments:

Sheryl said...

Oh, I didn't even think to use "inline" instead of block. When I used block it would mess up my tab bar after its display was set to none.

 

blogger templates | Make Money Online