Configuring Tables for a Menu for All Browsers - IDs of the Tables and their Cells
(Page 3 of 4 )
The table for the main menu (horizontal bar) does not have an ID. It does not need one, since the JavaScript code does not address the table, in its entirety. There are five menu items, so there are five cells for this table. The IDs are D0, D1, D2, D3, and D4 respectively.
The main table for the sub menus has an ID. Its ID is "MT." This table has only one row with five cells for the five drop-down menus. These cells are not given IDs. They do not need them, because the cells themselves are not addressed by the JavaScript code. Each of these cells has a table, which is the drop down menu. The IDs for the tables are DDT0, DDT1, DDT2, DDT3 and DDT4. Here DDT means Drop Down Table.
The ID of each cell in a table of a drop down menu begins with "TD" followed by the row number and then the cell number of the main table (this is like the row number in the previous series).
The Second Drop Down Menu Table IDs
This table has only one row, with three cells. We have been calling this the outer table. Let us continue to call it that. The ID of the table is "DDT1," which is one of the IDs we mentioned above.
The first of these cells has a table. This table is actually the second drop down menu. The IDs of its cells are given as mentioned above. This table (actual drop down menu) does not have an ID. It does not need to have it. The table is displayed whenever the outer table is displayed. Remember that the value of its display property is always "block."
The center (next) cell of the outer table has two tables for two sub menus. In order to understand how I gave the IDs we have to call to mind the IDs of cells of the menu items that give rise to the sub menus.
The menu item “Sub link 11 >” is in a cell whose ID is "TD11." The number part of the ID is "11." It is easier for us to give the number part to the table for the sub menu arising from this cell, the value "11." We just have to precede this number with some special characters. So, the table (sub menu) in the center cell that arises from the cell with the ID of "TD11" is given the ID "ST11." “ST” here means "Sub Table."
The number part of each menu item is the same as the number part of the ID of the cell where it is found. Remember that in this series, there is one link element per cell. There are no SPAN elements.
The menu item "Sub link 21 >" is in the cell whose ID is "TD21." This cell gives rise to a sub menu. The table for this sub menu is in the center cell as well, with the other sub menu table. For the same reasons given above, the ID for this sub menu table is "ST21."
The menu item “Sub link 111 >” can be identified in fig.12.2 of the previous part. This is a sub menu item. It is in the cell with ID "TD111." The table of the sub menu it gives rise to is in the third cell of the outer table. For the same reasons as given above, the ID of this table is "ST111."
Next: The Last Drop Down Menu Table IDs >>
More HTML Articles
More By Chrysanthus Forcha