35
Contents_Post()
Description:
This function closes the <td> tag left open by Contents_Pre() and then
subsequently closes the nested table. The user should always call Contents_Post()
if Contents_Pre() was used before the page content. The first HTML tag output
by this function is </td>.
Note: The user may call Top() and Bottom() without calling Contents_Pre()
Contents_Post() since Top() does not leave any HTML tags open.
Parameters:
None
As discussed in the above descriptions, the l_em405web.lua functions create a nested table with
the user content being one table cell. The best way to learn the effects of using the
l_em405web.lua library is to add them to your script, load the page in a web browser then view
the source using the browsers utility to view source.
Figure 14 shows an example web page using the l_em405web.lua library. This example
performs the same function as the example in Figure 13; however it uses the l_em405web.lua
library instead of explicitly outputting the full HTML.
Figure 14 Example Using “l_em405web.lua” Library
It is highly recommended that you use the W3C Markup Validation Service to validate you
HTML. This is a free utility available at:
. By validating your HTML,
you are ensuring that is will be properly displayed on any W3C compliant web browser.
em405web = require "l_em405web"
em405web.Top(0,0,"")
em405web.Contents_Pre()
-- Contents Begin Here --
for i=0, table.getn(arg) do
print(i,arg[i])
print("<br>")
end
-- Contents End Here --
em405web.Contents_Post()
em405web.Bottom()