I'm just starting to work with the html generation package of tcllib (ver
1.2.2). Can anyone point me to some examples of how the tcllib html
generation package is used?
TIA,
-Tennis
Quicj taste,
(bin) 15 % package req html
1.1
(bin) 16 % html::textInput first_name
<input type="text" name="first_name" value="" size="45">
(bin) 17 % html::textInputRow "MY LABEL" test_row
<tr>
<td>MY LABEL</td>
<td><input type="text" name="test_row" value="" size="45">
</td>
</tr>
(bin) 24 % set people {John Doe Mary Poppins Jack {B. Nimble}}
John Doe Mary Poppins Jack {B. Nimble}
(bin) 25 % html::tableFromList $people
<TABLE ><tr>
<td>John</td>
<td>Doe</td>
</tr>
<tr>
<td>Mary</td>
<td>Poppins</td>
</tr>
<tr>
<td>Jack</td>
<td>B. Nimble</td>
</tr>
</TABLE>
similarly there's html::tableFromArray, proc html::checkbox etc...
Using the html package with tclhttpd templates makes form/page
generation quite simple;-)
regards,
nicolas boretos
Don't know how set you are on using the html package, but if you're up for
suggestions, you may want to try TclXML (http://tclxml.sourceforge.net/).
It includes a module called xmlgen which can generate HTML. It even has a
couple examples.
I've never used the html package or the TclXML package, but it looks like
the two take really different approaches to the task at hand. I think it'd
be worth checking this one out to see if you prefer it over the other.
Regards,
Aric
Steve
> looks interesting..could you point me to the documentation on the html lib?
> thanks
http://aspn.activestate.com/ASPN/docs/ActiveTcl/ActiveTcl8.4.1.0-html/tcllib/html.html
http://tcllib.sourceforge.net/doc/html.html
All of tcllib:
http://aspn.activestate.com/ASPN/docs/ActiveTcl/ActiveTcl8.4.1.0-html/tcllib/index.html
http://tcllib.sourceforge.net/doc/index.html
--
Sincerely,
Andreas Kupries <akup...@shaw.ca>
Developer @ <http://www.activestate.com/>
Private <http://www.purl.org/NET/akupries/>
Join us at the Tenth Annual Tcl/Tk Conference <URL: http://wiki.tcl.tk/6274>
-------------------------------------------------------------------------------
}