More on the React Function for a Common Browser Menu
Welcome to the sixth part of a ten-part series on building a common browser menu. We continue in this part with the in-depth analysis of the react() function. As you may recall, in the last part we noted that the function was composed of five code segments, and began analyzing them. In this part, we shall complete the details of the react() function's fourth code segment and talk about the fifth code segment.
More on the React Function for a Common Browser Menu (Page 1 of 4 )
The react() Fourth Code Segment Details, continued
If the condition in the if-statement is true, then all of the statements in the block are executed. Recall that the aim of this segment is to make sure that cells in our column that are supposed to be transparent are transparent.
The first line forms the ID of the cell in our column of interest. The next line forms the ID of the corresponding cell in the Copy Table.
This segment is not applicable only to the drop down menu. It is applicable to all sub menus independent of their levels. The next statement makes a copy from the corresponding cell in the Copy Table into our cell of interest. The next statement makes the background color transparent. The last two lines give the corresponding cells in the Boolean and Number Table the content, “”, that is, an empty string; meaning our cell of interest has to be transparent and does not have to show any SPAN element.