Dynamic TAB tables for the Web

Dynamic TAB tables for the Web

This tip describes Web tab tables how they should work. There is no need to go back to the server to get the next tab.


Add this pass through HTML to your Domino form. This creates the tab tables tabs. Replacing the <Computed Value>'s with a computed text that contains this @function

@ReplaceSubstring(@Subset
(@DbName ; -1) ; "/" ; "")

<table border="0" cellspacing="0" 
cellpadding="0">
<tr>
<td>
<table bgcolor="E1E1E1" border="0" 
cellspacing="0" cellpadding="0" 
id="Cat1TabOff" class="Tabs" 
style="display:none">
<tr>
<td valign="top"><img src="/
<Computed Value>/opentab.gif">
</td>
<td><a href=javascript:doCategories
('Cat1','Category') id="Cat1" class="Category">
<font size="1" face="MS Sans Serif">Tab 1
<font></a></td>
<td valign="top"><img src="/
<Computed Value>/closetab.gif">
</td>
</tr>
</table>
<table bgcolor="E1E1E1" border="0" 
cellspacing="0" cellpadding="0"  
id="Cat1TabOn" class="Tabs" style="display:">
<tr>
<td bgcolor="white" valign="top">
<img src="/<Computed Value>
/opentab.gif"></td>
<td bgcolor="white"><font size="1" 
color="black" face="MS Sans Serif">Tab 1
<font></td>
<td bgcolor="white" valign="top">
<img src="/<Computed Value>
/closetab.gif"></td>
</tr>
</table>
</td>
<td>
<table

    Requires Free Membership to View

    Register today to access targeted resources from our editorial writers and independent industry experts focused on Lotus Domino, Notes, Workplace and other related technologies.

    By submitting your registration information to SearchDomino.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchDomino.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

bgcolor="E1E1E1" border="0" cellspacing="0" cellpadding="0" id="Cat2TabOff" class="Tabs" style="display:"> <tr> <td valign="top"><img src="/ <Computed Value>/opentab.gif"> </td> <td><a href=javascript:doCategories ('Cat2','Category') id="Cat2" class="Category"> <font size="1" face="MS Sans Serif">Tab 2 <font></a></td> <td valign="top"><img src="/ <Computed Value>/closetab.gif"> </td> </tr> </table> <table bgcolor="E1E1E1" border="0" cellspacing="0" cellpadding="0" id="Cat2TabOn" class="Tabs" style="display:none"> <tr> <td bgcolor="white" valign="top"> <img src="/<Computed Value> /opentab.gif"></td> <td bgcolor="white"><font size="1" color="black" face="MS Sans Serif">Tab 2 <font></td> <td bgColor="white" valign="top"> <img src="/<Computed Value> /closetab.gif"></td> </tr> </table> </td> </tr> </table> <div id="Cat1Top" style="display:"> Put the information you want Tab 1 to display here </div><div id="Cat2Top" style="display:"> Put the information you want Tab 2 to display here </div> Add this function to the JSHeader function doCategories(tmpid,tmpclass) { //Check that the element being used have the class of category. // if (tmpclass == "Category") { //get the id for the section that want to be displayed. var topTargetID = tmpid + "Top"; var topTargetElement = document.all(topTargetID); //get the id for the ontab that want to be displayed. var onTabTargetID = tmpid + "TabOn"; var onTabTargetElement = document. all(onTabTargetID); //get the id for the offtab that want to be hidden. var offTabTargetID = tmpid + "TabOff"; var offTabTargetElement = document.all(offTabTargetID); //hide all of the tables sections to start with. Cat1Top.style.display = "none" ; Cat2Top.style.display = "none" ; //hide all of the tab with out links. Cat1TabOn.style.display = "none" ; Cat2TabOn.style.display = "none" ; //show all of the tab with links. Cat1TabOff.style.display = "" ; Cat2TabOff.style.display = "" ; //display the relevent table section. if (topTargetElement.style.display == "none") { topTargetElement.style.display = ""; } else { topTargetElement.style.display = "none"; } //display the relevent ontab section. if (onTabTargetElement.style.display == "none") { onTabTargetElement.style.display = ""; } else { onTabTargetElement.style.display = "none"; } //display the relevent offtab section. if (offTabTargetElement.style.display == "none") { offTabTargetElement.style.display = ""; } else { offTabTargetElement.style.display = "none"; } } }

This was first published in April 2003

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.