Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

HTML Generation From tcllib

109 views
Skip to first unread message

Tennis Smith

unread,
Sep 10, 2003, 11:40:23 AM9/10/03
to
Hi,

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


Nicolas Boretos

unread,
Sep 11, 2003, 3:40:07 AM9/11/03
to Tennis Smith

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

Aric Bills

unread,
Sep 11, 2003, 12:22:53 PM9/11/03
to
Hi Tennis,

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 Sagerian

unread,
Sep 11, 2003, 4:46:00 PM9/11/03
to
looks interesting..could you point me to the documentation on the html lib?
thanks

Steve

Andreas Kupries

unread,
Sep 12, 2003, 2:39:26 AM9/12/03
to

steve_s...@mverify.com (Steve Sagerian) writes:

> 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>
-------------------------------------------------------------------------------
}

0 new messages