html-template-users Mailing List for HTML::Template (Page 59)
Brought to you by:
samtregar
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(42) |
Jul
(80) |
Aug
(77) |
Sep
(97) |
Oct
(65) |
Nov
(80) |
Dec
(39) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(63) |
Feb
(47) |
Mar
(45) |
Apr
(63) |
May
(67) |
Jun
(51) |
Jul
(78) |
Aug
(37) |
Sep
(45) |
Oct
(59) |
Nov
(50) |
Dec
(70) |
2004 |
Jan
(23) |
Feb
(90) |
Mar
(37) |
Apr
(53) |
May
(111) |
Jun
(71) |
Jul
(35) |
Aug
(58) |
Sep
(35) |
Oct
(35) |
Nov
(35) |
Dec
(20) |
2005 |
Jan
(51) |
Feb
(19) |
Mar
(20) |
Apr
(8) |
May
(26) |
Jun
(14) |
Jul
(49) |
Aug
(24) |
Sep
(20) |
Oct
(49) |
Nov
(17) |
Dec
(53) |
2006 |
Jan
(12) |
Feb
(26) |
Mar
(45) |
Apr
(19) |
May
(19) |
Jun
(13) |
Jul
(11) |
Aug
(9) |
Sep
(10) |
Oct
(16) |
Nov
(17) |
Dec
(13) |
2007 |
Jan
(9) |
Feb
(12) |
Mar
(28) |
Apr
(33) |
May
(12) |
Jun
(12) |
Jul
(19) |
Aug
(4) |
Sep
(4) |
Oct
(5) |
Nov
(5) |
Dec
(13) |
2008 |
Jan
(6) |
Feb
(7) |
Mar
(14) |
Apr
(16) |
May
(3) |
Jun
(1) |
Jul
(12) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(9) |
2009 |
Jan
(9) |
Feb
|
Mar
(10) |
Apr
(1) |
May
|
Jun
(6) |
Jul
(5) |
Aug
(3) |
Sep
(7) |
Oct
(1) |
Nov
(15) |
Dec
(1) |
2010 |
Jan
|
Feb
|
Mar
|
Apr
(9) |
May
|
Jun
|
Jul
(5) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
(3) |
Mar
|
Apr
(28) |
May
|
Jun
|
Jul
(3) |
Aug
(4) |
Sep
(3) |
Oct
|
Nov
(8) |
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
(2) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
2016 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
From: P K. <pk...@ei...> - 2004-02-17 14:53:36
|
Kapoor, Nishikant wrote: >Sorry if this post is off-topic but I have a feeling people in this list would have definitely come across it. > >I am looking to generate an event calendar using H::T. Can anyone help me with some pointers? code snippets? > >I did search the archives but could not find much info. > >Thanks, >Nishi > > > here is a fragment of some code I wrote a long time ago. It has some dependencies unique to my situation, and is crufty and inelegant, but it should give you a place to start. I was using SQLite to store the events, grabbing the data from the database, and passing the recordset to different routines to create the monthly, yearly, daily or weekly views. Here is the monthly view. The getappts() gets the data from the database, and getappt() converts it to viewable code (I know, I know, I already said it is crufty and inelegant, but it works) -- sub month { my @cal = (); my $start = my $firstOfMonth = timelocal(0, 0, 0, 1, $mon, $year); my $end = my $lastOfMonth = timelocal(59, 59, 23, $daysInMonth, $mon, $year); my $appts_ref = &getappts($start, $end); my @firstOfMonth = localtime($firstOfMonth); my $wdayOfFirstOfMonth = $firstOfMonth[6]; my $date = 1; # first week my %week; #my $thisweek = $week; my $thisweek = int(($firstOfMonth[7] + 1) / 7) + 1; $week{'week'} = $thisweek; $week{'weekcd'} = timelocal(0, 0, 0, $date, $mon, $year); my @week; for (1..7) { my %day; my @appointments; if ($_ <= $wdayOfFirstOfMonth) { $day{'day'} = ''; $day{'daycd'} = ''; $day{'appointments'} = \@appointments; } else { $day{'day'} = ($date == $today) ? "<div id='today'>" . $date . '</div>' : $date; $day{'daycd'} = timelocal(0, 0, 0, $date, $mon, $year); $day{'appointments'} = &getappt($mon, $date, $hour, 'month', $appts_ref); $date++; } push(@week, \%day); } $week{'days'} = \@week; push(@cal, \%week); # end first week # rest of the weeks while ($date <= $daysInMonth) { my %week; $thisweek++; $week{'week'} = $thisweek; $week{'weekcd'} = timelocal(0, 0, 0, $date, $mon, $year); my @week; for (1..7) { my %day; my @appointments; if ($date <= $daysInMonth) { $day{'day'} = ($date == $today) ? "<div id='today'>" . $date . '</div>' : $date; $day{'daycd'} = timelocal(0, 0, 0, $date, $mon, $year); $day{'appointments'} = &getappt($mon, $date, $hour, 'month', $appts_ref); } else { $day{'day'} = ''; $day{'daycd'} = ''; $day{'appointments'} = \@appointments; } $date++; push(@week, \%day); } $week{'days'} = \@week; push(@cal, \%week); } return \@cal; } sub getappts { my ($start, $end) = @_; my $dbh = &connecttoDB(); my $sql = "SELECT event_id, start, end, title FROM events WHERE start BETWEEN $start AND $end ORDER BY start"; my $sth = $dbh->prepare(qq{$sql}); $sth->execute; return my $tbl_ary_ref = $sth->fetchall_arrayref({}); } sub getappt { my ($m, $d, $h, $doh, $ary_ref) = @_; my @inres = @$ary_ref; my @outres; foreach (@inres) { my %row = %$_; my ($ssec, $smin, $shour, $smday, $smon, $syear, $swday, $syday, $sisdst) = localtime($row{'start'}); if ($doh eq 'day') { if ($shour == $h) { $row{'start'} = &timetobase12($shour, $smin); my ($esec, $emin, $ehour, $emday, $emon, $eyear, $ewday, $eyday, $eisdst) = localtime($row{'end'}); $row{'end'} = &timetobase12($ehour, $emin); push(@outres, \%row) ; } } elsif ($doh eq 'week') { if ($smday == $d and $shour == $h) { $row{'start'} = &timetobase12($shour, $smin); my ($esec, $emin, $ehour, $emday, $emon, $eyear, $ewday, $eyday, $eisdst) = localtime($row{'end'}); $row{'end'} = &timetobase12($ehour, $emin); push(@outres, \%row) ; } } elsif ($doh eq 'month') { if ($smday == $d) { $row{'start'} = &timetobase12($shour, $smin); my ($esec, $emin, $ehour, $emday, $emon, $eyear, $ewday, $eyday, $eisdst) = localtime($row{'end'}); $row{'end'} = &timetobase12($ehour, $emin); push(@outres, \%row) ; } } elsif ($doh eq 'year') { if ($smon == $m and $smday == $d) { $row{'start'} = &timetobase12($shour, $smin); my ($esec, $emin, $ehour, $emday, $emon, $eyear, $ewday, $eyday, $eisdst) = localtime($row{'end'}); $row{'end'} = &timetobase12($ehour, $emin); push(@outres, \%row) ; } } } return \@outres; } $template->param( prev => $prev, next => $next, currentlink => $currentlink, currentdesc => $currentdesc, view => $view, monthwidget => &monthwidget, daywidget => &daywidget, yearwidget => &yearwidget, cal => &month(), selecteddayvalue => $mday, selecteddaydisplay => $mday, selectedmonthvalue => $mon, selectedmonthdisplay => $months[$mon], selectedyearvalue => $year, selectedyeardisplay => $year ); ========= <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Month</title> <link rel="stylesheet" TYPE="text/css" href="../perlpim.css"> </head> <body> <tmpl_include navbar.html> <table border="1" width="600" cellpadding="2" cellspacing="1" bgcolor="black"> <tr bgcolor="silver"><td colspan="8"><tmpl_var currentdesc></td></tr> <tr bgcolor="#ccffff"> <td width="40" bgcolor="#cccc99">Week</td> <td width="80" bgcolor="silver">Sun</td> <td width="80">Mon</td> <td width="80">Tue</td> <td width="80">Wed</td> <td width="80">Thu</td> <td width="80">Fri</td> <td width="80" bgcolor="silver">Sat</td> </tr> <!-- start month loop --> <tmpl_loop cal> <tr bgcolor="white" valign="top"> <td bgcolor="#cccc99" height="70"> <a href="index.cgi?view=week&cd=<tmpl_var weekcd>"><tmpl_var week></a></td> <tmpl_loop days> <td <tmpl_if __first__>bgcolor="silver"</tmpl_if><tmpl_if __last__>bgcolor="silver"</tmpl_if><tmpl_unless day>bgcolor="silver"</tmpl_unless>> <tmpl_if day> <a href="index.cgi?view=day&cd=<tmpl_var daycd>" title="Day view"><tmpl_var day></a><br> </tmpl_if> <tmpl_loop appointments> <tmpl_if start> <tmpl_var start> - <tmpl_var end>: <a href="index.cgi?event_id=<tmpl_var event_id>" title="Details on this event"> <tmpl_var title></a><br> </tmpl_if> </tmpl_loop> </td> </tmpl_loop> </tr> </tmpl_loop> <!-- end month loop --> </table> </body> </html> |
From: Kapoor, N. <nis...@xc...> - 2004-02-17 14:29:10
|
Sorry if this post is off-topic but I have a feeling people in this list = would have definitely come across it. I am looking to generate an event calendar using H::T. Can anyone help = me with some pointers? code snippets? I did search the archives but could not find much info. Thanks, Nishi |
From: Mathew R. <mat...@re...> - 2004-02-16 22:15:10
|
in that case, maybe 'print_to' needs to be overloaded so as to take = both.... Mathew > The 'print_to' parameter takes an open filehandle. You have to open = the=20 > file first on your own for writing and then pass the file handle in. = For=20 > instance, if you opened 'test.tmpl' under the filehandle 'FH', then = you=20 > pass '$template->output( print_to =3D> *FH );' >=20 > > > >I am trying to put to create a static page using > >html::template. I tried using print > >$template->output(print_to =3D> 'test.tmpl'); and it > >doesn't change the test.tmpl file and I am totally > >stuck please help. > > |
From: Mathew R. <mat...@re...> - 2004-02-16 22:12:35
|
I am using Perl5.8 and have had no such problem. Given the number = people using H::T, I'd suggest looking eslsewhere first... I'd suggest turning on debugging (ie set the 'debug' option), which will = send lots of stuff to your apache errorlog file. Mathew > Hi, >=20 > Further to my original problem (occasionally having problems parsing a > template file with mod_perl), I've narrowed down the problem to what > appears to be a bug in Perl's pattern matching. Printing the contents = of > the $chunk variable shows it's perfectly valid, whereas the $which > variable (assigned directly from $1 of the pattern match) contains > gibberish - but interesting exactly the same gibberish every time. >=20 > Does anybody know if this is a known Perl bug? Also, I'm wondering if > the large pattern match to look for tags is causing problems - I can > imagine if anything is going to tickle bugs in Perl's RE engine, it's > going to be a very long pattern. Is there any reason this wasn't done = as > a set of separate matches? I'm tempted to split it up to see if it > solves (or at least works around) the problem, but I was wondering if > there's some reason why this wouldn't be a good idea. >=20 > In case it helps I'm using: >=20 > Apache: 2.0.40 > mod_perl: 1.99.05 (I'm not quite sure about the minor number, got it > from the RPM name) > Perl: 5.8.0 |
From: Timm M. <tm...@ag...> - 2004-02-16 19:21:24
|
The 'print_to' parameter takes an open filehandle. You have to open the file first on your own for writing and then pass the file handle in. For instance, if you opened 'test.tmpl' under the filehandle 'FH', then you pass '$template->output( print_to => *FH );' At 10:56 AM 2/16/04 -0800, Kevin Fletcher wrote: >Hey, > > > >I am trying to put to create a static page using >html::template. I tried using print >$template->output(print_to => 'test.tmpl'); and it >doesn't change the test.tmpl file and I am totally >stuck please help. > > > >Thanks > > > >Kevin > > > >------------------------------------------------------- >SF.Net is sponsored by: Speed Start Your Linux Apps Now. >Build and deploy apps & Web services for Linux with >a free DVD software kit from IBM. Click Now! >http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click >_______________________________________________ >Html-template-users mailing list >Htm...@li... >https://lists.sourceforge.net/lists/listinfo/html-template-users |
From: Bob H. <bob...@ad...> - 2004-02-16 19:17:55
|
> -----Original Message----- > From: htm...@li... [mailto:html- > tem...@li...] On Behalf Of Kevin = Fletcher > Sent: Monday, February 16, 2004 1:56 PM > To: htm...@li... > Subject: [htmltmpl] creating output to a file >=20 > Hey, >=20 >=20 >=20 > I am trying to put to create a static page using > html::template. I tried using print > $template->output(print_to =3D> 'test.tmpl'); and it > doesn=12t change the test.tmpl file and I am totally > stuck please help. >=20 >=20 >=20 > Thanks >=20 >=20 >=20 > Kevin >=20 >=20 >=20 > ------------------------------------------------------- > SF.Net is sponsored by: Speed Start Your Linux Apps Now. > Build and deploy apps & Web services for Linux with > a free DVD software kit from IBM. Click Now! > http://ads.osdn.com/?ad_id=3D1356&alloc_id=3D3438&op=3Dclick > _______________________________________________ > Html-template-users mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/html-template-users http://www.redantigua.com/html-template.html It gives a good quickie. |
From: Kevin F. <spo...@ya...> - 2004-02-16 19:00:12
|
Hey, I am trying to put to create a static page using html::template. I tried using print $template->output(print_to => 'test.tmpl'); and it doesnt change the test.tmpl file and I am totally stuck please help. Thanks Kevin |
From: Andy P. <ap...@gl...> - 2004-02-16 12:42:15
|
Hi, Further to my original problem (occasionally having problems parsing a template file with mod_perl), I've narrowed down the problem to what appears to be a bug in Perl's pattern matching. Printing the contents of the $chunk variable shows it's perfectly valid, whereas the $which variable (assigned directly from $1 of the pattern match) contains gibberish - but interesting exactly the same gibberish every time. Does anybody know if this is a known Perl bug? Also, I'm wondering if the large pattern match to look for tags is causing problems - I can imagine if anything is going to tickle bugs in Perl's RE engine, it's going to be a very long pattern. Is there any reason this wasn't done as a set of separate matches? I'm tempted to split it up to see if it solves (or at least works around) the problem, but I was wondering if there's some reason why this wouldn't be a good idea. In case it helps I'm using: Apache: 2.0.40 mod_perl: 1.99.05 (I'm not quite sure about the minor number, got it from the RPM name) Perl: 5.8.0 Cheers, - Andy ******************Legal Disclaimer************************** "This email may contain confidential and privileged material for the sole use of the intended recipient. Any unauthorized review, use or distribution by others is strictly prohibited. If you have received the message in error, please advise the sender by reply email @globespanvirata.com, and delete the message. Thank you." ************************************************************ |
From: Andy P. <ap...@gl...> - 2004-02-16 04:15:07
|
Hi, First I apologise if I'm being dense, but this problem is really confusing = the heck out of me... I've written a photo archive script using CGI::Application (ver. 3.21) and = HTML::Template (ver. 2.6), which ran fine as a standalone CGI script. Now I= 've ported it across to using mod_perl, and I'm noticing a really strange i= ntermittent problem. Basically it seems that sometimes, especially when you= request a page for the first time for a long while, when HTML::Template op= ens the .tmpl file what it gets is being somehow corrupted. This evidences = itself as an error about not recognising the TMPL_... tag - I tweaked the e= rror message slightly to print the content of the $which variable (which sh= ould hold the tag being parsed, it seems?) - this comes from line 2230: HTML::Template->new() : Unknown or unmatched TMPL construct (T0B5=20 What it *should* be printing is the contents of the $which variable in brac= kets, but it seems there are some weird control characters which trash the = rest of the string somehow (at least that's my guess). I haven't put enough= trace in to be able to tell the entire contents of the file that's being r= ead - perhaps this is just trampling the $which variable rather than the wh= ole file? In case it's useful, the line as I've amended it is: die "HTML::Template->new() : Unknown or unmatched TMPL construct ($which ) at $fname : line $fcounter."; I think what I'm doing should be fairly standard - I'm calling tmpl_path() = of CGI::Application in the cgiapp_prerun() method, and then the tmpl_load()= method later on - it's at this point the error occurs. Anyway, I realise this isn't necessarily a HTML::Template problem, but I fi= gured it was a good place to start since presumably some of you have experi= ence of using HTML::Template with mod_perl, and the potential problems. My = best guess is that somehow running the script on a newly created sub-proces= s is causing the problem, but I can't for the life of me see how - the fact= that the open succeeds, but then we get garbage later, is what baffles me. I've tried this with and without caching of templates - caching seemed to m= ake the problem happen less often, but that might have been my imagination.= Also, reloading the page a few times usually sorts the problem out, which = seems vaguely consistent with the "sub-process opening a file for the first= time" problem. Any help would be greatly appreciated, even if it's simply a more appropria= te place to redirect requests for help! Also any options to any of the code= involved to produce more helpful logs would be really handy - I'm complete= ly new to using mod_perl so I may well have fallen foul of some common trap! Cheers, - Andy ******************Legal Disclaimer************************** "This email may contain confidential and privileged material for the sole u= se of the intended recipient. Any unauthorized review, use or distribution= by others is strictly prohibited. If you have received the message in err= or, please advise the sender by reply email @globespanvirata.com, and delet= e the message. Thank you." ************************************************************ |
From: Mathew R. <mat...@re...> - 2004-02-12 01:34:34
|
> --Use of $_ should be avoided in modules. It's easy to screw up the=20 > localization and clobber existing values of $_ in code higher up. = This can=20 > be solved either by using a regular variable, or by explicitly = localizing it. done > --When you create the string used to match tags, it will be faster to = wrap=20 > it in a qr// instead of a simple string. This will cause perl to = compile=20 > the regex once instead of repeatedly compiling it at runtime whenever = the=20 > string is interpolating into the s///. done In the process, I found: - a bug or two in the TMPL_SET code - I changed the way regex's work for case sensitivity, which should = result in faster regex parsing. cheers, Mathew |
From: Jason P. <ja...@jo...> - 2004-02-11 16:07:10
|
>> <input type="radio" name="Color" value="Red" <!--TMPL_VAR NAME=Red -->"> >> <input type="radio" name="Color" value="Blue" <!--TMPL_VAR NAME=Blue >> -->"> >> >> But the above is really ugly, and I gotta believe >> there's a better approach (that I'm too dense to recognize) > Yeah, I know, it seems like there should be a better solution. In fact, > due to the limitations of HTML, there are only a series of equally sucky > solutions. What you have above is as good as any. Blame W3C. I would recommend checking out HTML::FillInForm for your situation - it'll take care of those radio buttons and select boxes, since you're rehashing the same form if you didn't receive valid input. Something like this un-tested code: # You're processing the input from the form... if ( bad_input( $query ) ) { $template = HTML::Template->new( 'filename' => 'previous_steps_template.TMPL', 'die_on_bad_params' => 0, ); $fif = HTML::FillInForm->new; print $fif->fill( 'scalarref' => $template->output, 'fobject' => $query ); exit; } You'll be amazed how cool FillInForm will work ... you won't need to do that TMPL_VAR stuff inside the form fields ... FillInForm will handle all that for you. HTH, Jason |
From: Cees H. <ce...@si...> - 2004-02-11 16:03:22
|
C Hagstrom wrote: > I'm wondering if I'm missing something simple here ..... > I've got things working with a pretty cludgy looking work around: > In the programming: > > ##CH likely a better way to do this > if ($q->param('Color') eq 'Red') { > $q->param('Red','checked') > }; > if ($q->param('Color') eq 'Blue') { > $q->param('Blue','checked') > }; > > And in the template: > > <input type="radio" name="Color" value="Red" <!--TMPL_VAR NAME=Red -->"> > <input type="radio" name="Color" value="Blue" <!--TMPL_VAR NAME=Blue -->"> > > But the above is really ugly, and I gotta believe > there's a better approach (that I'm too dense to recognize) That is exactly how I used to handle that situation as well. Until I started using HTML::FillInForm! Using HTML::Template to fill in form elements is a pain, and it clutters up the templates... HTML::FillInForm will do all the hard work for you, without needing to worry if it's a checkbox, radio button, or just a plain input box you are dealing with. Just render your template, then run it through HTML::FillInForm before you send it out to the client. The only caveat is that it needs to parse the entire HTML file to find the form elements and alter them, so it decreases the perfomance of your app slightly (not enough to worry me though). Cheers, Cees |
From: Keith J. <kja...@ey...> - 2004-02-11 16:03:10
|
The easiest way (and I'm sure others will recommend this too) is to use HTML::FillInForm. The next best way (IMHO) is to do a simple variation of your second method: perl: $tmpl->param( $q->param('Color')."_Checked" => "checked"); template: <input type="radio" name="Color" value="Red" <!--TMPL_VAR NAME=Red_Checked -->"> <input type="radio" name="Color" value="Blue" <!--TMPL_VAR NAME=Blue_Checked -->"> On Wed, 2004-02-11 at 10:32, C Hagstrom wrote: > I'm a newbie to HTML::Template, and this > is my first post to the list .... > > My question has to do with radio buttons, > and any recommended ways of carrying > a checked value through successive forms. > > I have my forms set up so submission errors > (a missing required field, for example) are > "carried through" ... that is, the form is regenerated, > and any fields filled out in the first submission > retain their respective values at the next iteration. > > This all works fine, and I've been able to figure out > how to carry drop-down lists values along as well. Example: > > Choose an item from the list: > <select name="Item"> > <!--TMPL_IF NAME="Item" --> > <option selected><!--TMPL_VAR NAME=Item --> > <!--/TMPL_IF--> > <option> > <option value="1">One > <option value="2">Two > <option value="3">Three > </select> > > What I'm trying to do is figure out a way to do something > similar with radio buttons .... in other words, carry a "checked" > value through to the next form generation. The wrinkle > that's causing me to scratch my head is that the field-name > value is the same for each radio button, so I *can't* do something > like: > > <input type="radio" name="Color" value="Red" > <!--TMPL_IF NAME="Color" --> > checked > <!--/TMPL_IF--> > "> > > <input type="radio" name="Color" value="Blue" > <!--TMPL_IF NAME="Color" --> > checked > <!--/TMPL_IF--> > "> > > I'm wondering if I'm missing something simple here ..... > I've got things working with a pretty cludgy looking work around: > In the programming: > > ##CH likely a better way to do this > if ($q->param('Color') eq 'Red') { > $q->param('Red','checked') > }; > if ($q->param('Color') eq 'Blue') { > $q->param('Blue','checked') > }; > > And in the template: > > <input type="radio" name="Color" value="Red" <!--TMPL_VAR NAME=Red -->"> > <input type="radio" name="Color" value="Blue" <!--TMPL_VAR NAME=Blue -->"> > > But the above is really ugly, and I gotta believe > there's a better approach (that I'm too dense to recognize) > > Any suggestions? > > Carl > hag...@ep... > > > > > > > > ------------------------------------------------------- > SF.Net is sponsored by: Speed Start Your Linux Apps Now. > Build and deploy apps & Web services for Linux with > a free DVD software kit from IBM. Click Now! > http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click > _______________________________________________ > Html-template-users mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/html-template-users -- Keith Jackson <kja...@ey...> |
From: Bill M. <mo...@ha...> - 2004-02-11 16:02:09
|
On Wed, Feb 11, 2004 at 10:32:49AM -0500, C Hagstrom wrote: > My question has to do with radio buttons, > and any recommended ways of carrying > a checked value through successive forms. Are you talking about "sticky" forms? > I have my forms set up so submission errors > (a missing required field, for example) are > "carried through" ... that is, the form is regenerated, > and any fields filled out in the first submission > retain their respective values at the next iteration. Yep, that's sticky forms. Use HTML::FillInForm and you don't have to bother with all of that. -- Bill Moseley mo...@ha... |
From: Timm M. <tm...@ag...> - 2004-02-11 15:42:27
|
At 10:32 AM 2/11/04 -0500, C Hagstrom wrote: <> >And in the template: > ><input type="radio" name="Color" value="Red" <!--TMPL_VAR NAME=Red -->"> ><input type="radio" name="Color" value="Blue" <!--TMPL_VAR NAME=Blue -->"> > >But the above is really ugly, and I gotta believe >there's a better approach (that I'm too dense to recognize) Yeah, I know, it seems like there should be a better solution. In fact, due to the limitations of HTML, there are only a series of equally sucky solutions. What you have above is as good as any. Blame W3C. |
From: C H. <hag...@ep...> - 2004-02-11 15:33:36
|
I'm a newbie to HTML::Template, and this is my first post to the list .... My question has to do with radio buttons, and any recommended ways of carrying a checked value through successive forms. I have my forms set up so submission errors (a missing required field, for example) are "carried through" ... that is, the form is regenerated, and any fields filled out in the first submission retain their respective values at the next iteration. This all works fine, and I've been able to figure out how to carry drop-down lists values along as well. Example: Choose an item from the list: <select name="Item"> <!--TMPL_IF NAME="Item" --> <option selected><!--TMPL_VAR NAME=Item --> <!--/TMPL_IF--> <option> <option value="1">One <option value="2">Two <option value="3">Three </select> What I'm trying to do is figure out a way to do something similar with radio buttons .... in other words, carry a "checked" value through to the next form generation. The wrinkle that's causing me to scratch my head is that the field-name value is the same for each radio button, so I *can't* do something like: <input type="radio" name="Color" value="Red" <!--TMPL_IF NAME="Color" --> checked <!--/TMPL_IF--> "> <input type="radio" name="Color" value="Blue" <!--TMPL_IF NAME="Color" --> checked <!--/TMPL_IF--> "> I'm wondering if I'm missing something simple here ..... I've got things working with a pretty cludgy looking work around: In the programming: ##CH likely a better way to do this if ($q->param('Color') eq 'Red') { $q->param('Red','checked') }; if ($q->param('Color') eq 'Blue') { $q->param('Blue','checked') }; And in the template: <input type="radio" name="Color" value="Red" <!--TMPL_VAR NAME=Red -->"> <input type="radio" name="Color" value="Blue" <!--TMPL_VAR NAME=Blue -->"> But the above is really ugly, and I gotta believe there's a better approach (that I'm too dense to recognize) Any suggestions? Carl hag...@ep... |
From: Timm M. <tm...@ag...> - 2004-02-11 14:07:56
|
At 09:50 AM 2/11/04 +1100, Mathew Robertson wrote: >Hi list, > >A little while ago, I asked people for implementations of various filters >that are used, so that we could create a module which contains generic >filters. Well here it is.... Attached is a module which implements some >generic filters. If anyone has others that they would like added, please >send them to me. I'm glad somebody took the time to do this. A little constructive criticism: --Use of $_ should be avoided in modules. It's easy to screw up the localization and clobber existing values of $_ in code higher up. This can be solved either by using a regular variable, or by explicitly localizing it. --When you create the string used to match tags, it will be faster to wrap it in a qr// instead of a simple string. This will cause perl to compile the regex once instead of repeatedly compiling it at runtime whenever the string is interpolating into the s///. Otherwise, I like it. Thanks, Timm |
From: Puneet K. <pk...@ei...> - 2004-02-11 13:56:50
|
On Feb 11, 2004, at 7:08 AM, LDT wrote: > I'm a little stumped on how best to approach a particular problem.=A0 = I=20 > have a report I'm building that will span an uncertain number of=20 > columns and uncertain number of rows.=A0 Below is a sample of what the=20= > report might look like: > > > Account=A0=A0 Descr=A0=A0 Jan=A0=A0 Feb=A0=A0 Jun=A0=A0 Aug=A0=A0 = Nov=A0=A0=A0=A0 Total > 51112=A0=A0=A0=A0 Fred=A0=A0=A0=A0 $5=A0=A0 $10=A0=A0=A0 $0=A0=A0 = $15=A0=A0=A0 $0=A0=A0=A0=A0=A0=A0 $30 > 51119=A0=A0=A0=A0 Lucy=A0=A0=A0=A0 $0=A0=A0=A0 $0=A0=A0=A0 $7=A0=A0=A0 = $0=A0=A0=A0 $0=A0=A0=A0=A0=A0=A0=A0 $7 > 51121=A0=A0=A0=A0 Ethel=A0=A0=A0 $0=A0=A0 $20=A0=A0=A0 $0=A0=A0=A0 = $0=A0=A0=A0 $3=A0=A0=A0=A0=A0=A0 $23 > 51178=A0=A0=A0=A0 Ricky=A0=A0=A0 $1=A0=A0=A0 $6=A0=A0=A0 $3=A0=A0=A0 = $2=A0=A0=A0 $4=A0=A0=A0=A0=A0=A0 $16 > > The data I pull from the database comes into a result set that looks=20= > like this: > > Account=A0=A0 Month=A0=A0=A0=A0 Amount > 51112=A0=A0=A0=A0=A0=A0=A0 1=A0=A0=A0=A0=A0=A0=A0=A0=A0 5 > 51112=A0=A0=A0=A0=A0=A0=A0 2=A0=A0=A0=A0=A0=A0=A0=A0 10 > 51112=A0=A0=A0=A0=A0=A0=A0 7=A0=A0=A0=A0=A0=A0=A0=A0 15 > 51119=A0=A0=A0=A0=A0=A0=A0 6=A0=A0=A0=A0=A0=A0=A0=A0=A0 7 > 51121=A0=A0=A0=A0=A0=A0=A0 2=A0=A0=A0=A0=A0=A0=A0=A0 20 > 51121=A0=A0=A0=A0=A0=A0 11=A0=A0=A0=A0=A0 =A0=A0=A0=A03 > .. Look at the following thread=20 http://www.perlmonks.org/index.pl?node_id=3D324008 I have a complete, working code snippet there for normalizing a=20 denormalized recordset. You can use that as the base to build your own=20= data transformation routine. |
From: Roger B. W. <ro...@fi...> - 2004-02-11 13:28:52
|
On Wed, Feb 11, 2004 at 05:08:04AM -0800, LDT wrote: >The question is: how do I create my hash references to push into my loop in the correct order so that when I loop through my template, it all appears in the correct column? I've been able to successfully loop through a structure that has fixed columns and fixed rows, but this one is puzzling me and I don't know where to start. My approach would be to remodel the data into a fixed format, if there are few enough data that you can get away with holding them in memory twice (which for an HTML page you probably can). Also, while I used to use the named hash variable method that's in the example (%r1, %r2, etc.), these days I tend to use an explicitly anonymous hash because I find it more intuitive. So here's some (untested) code which should do what I think you want: my %data; my %account; my %month; # do database query here while (my $account,$description,$month,$amount)=$sth->fetchrow_array) { $data{$account}{$month}=$amount; $account{$account}=$description; $month{$month}=1; # gives us a list of "active" months } my @months=sort {$a <=> $b} keys %month; # or just my @months=(1..12); if you prefer my @accounts=sort {$a <=> $b} keys %account; my @ol; foreach my $account (@accounts) { my @il; my $total=0; foreach my $month (@months) { # use an empty space if no data are available push @il,{amount => $data{$account}{$month} || ''}; $total+=$data{$account}{$month}; } push @ol,{account => $account, description => $account{$account}, total => $total, month => \@il} } $tmpl->param(accounts => \@ol); which would go with a template something like: <tmpl_loop name=accounts> <tr><td><tmpl_var name=account></td> <td><tmpl_var name=description></td> <tmpl_loop name=month> <td>$<tmpl_var name=amount></td></tr> </tmpl_loop> <td>$<tmpl_var name=total></td></tr> </tmpl_loop> You'd generate the table headers separately (perhaps based on the content of @months), and probably use sprintf() for formatting the numbers, but I think that's the core of what you're after. Hope this helps, Roger |
From: LDT <per...@ya...> - 2004-02-11 13:08:43
|
I'm a little stumped on how best to approach a particular problem. I have a report I'm building that will span an uncertain number of columns and uncertain number of rows. Below is a sample of what the report might look like: Account Descr Jan Feb Jun Aug Nov Total 51112 Fred $5 $10 $0 $15 $0 $30 51119 Lucy $0 $0 $7 $0 $0 $7 51121 Ethel $0 $20 $0 $0 $3 $23 51178 Ricky $1 $6 $3 $2 $4 $16 The data I pull from the database comes into a result set that looks like this: Account Month Amount 51112 1 5 51112 2 10 51112 7 15 51119 6 7 51121 2 20 51121 11 3 51178 1 1 51178 2 6 51178 6 3 51178 8 2 51178 11 4 So, in effect, only accounts that have amounts in them for any given month will appear in my data set. The question is: how do I create my hash references to push into my loop in the correct order so that when I loop through my template, it all appears in the correct column? I've been able to successfully loop through a structure that has fixed columns and fixed rows, but this one is puzzling me and I don't know where to start. The best I've come up with so far is to get the last account and its amount to appear in the first two columns, repeated 12 times (definitely not what I want!) by looping through each month that I might have (1-12). I looked at several examples of nested loops, but I don't seem to be able to figure out what gets nested where. On the other hand, maybe I need to get my result set to look different?? I don't know SQL that well, but we have folks here who can help me if I need to adjust what the result set looks like. Thanks for any insights and/or examples you can provide. Lori P.S. I was using the model below for nested loops that I found on the web, but I still don't understand what's the @outer_loop_list and what's supposed to be in the @inner_loop_list. The Perl stuff: my @l1; foreach my $outer ( @outer_loop_list ) { my %r1=(outer => $outer); # add more outer-loop stuff here in %r1 my @l2; foreach my $inner ( @inner_loop_list) { my %r2=(inner => $inner); # add more inner-loop stuff here in %r2 push @l2,\%r2; } $r1{innerloop}=\@l2; push @l1,\%r1; } $template->param(outerloop => \@l1); The .tmpl file: <tmpl_loop name=outerloop> <tr><td><tmpl_var name=outer></td> <tmpl_loop name=innerloop> <td><tmpl_var name=inner></td> </tmpl_loop> </tr> </tmpl_loop> --------------------------------- Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online |
From: <m.s...@gm...> - 2004-02-11 06:05:19
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I have to second this. Without Pauls patch the escaping indeed is broken when the value of the escape param is only in single quotes. I applied your change and it works now as it should. Thank you! Kind regards Markus -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: Processed by Mailcrypt 3.5.6 and Gnu Privacy Guard <http://www.gnupg.org/> iD8DBQFAKcXoxxUzQSse11ARArSjAJ0QoWTuSVVQdMvyghUOKR4M8ncr+wCeJKa4 HewOQcimQGMwaC99kenr0xE= =bYI3 -----END PGP SIGNATURE----- |
From: Mathew R. <mat...@re...> - 2004-02-10 22:52:46
|
Hi list, A little while ago, I asked people for implementations of various = filters that are used, so that we could create a module which contains = generic filters. Well here it is.... Attached is a module which = implements some generic filters. If anyone has others that they would = like added, please send them to me. regards, Mathew |
From: Mathew R. <mat...@re...> - 2004-02-10 22:43:24
|
Hi Daniel, If you use HTML::Template::Expr (rather than H::T), you can move the = 'flag' code into the template itself, thus decoupling the presentation = of 5 images per row, from the Perl logic, by doing: <TMPL_LOOP...> <TMPL_IF EXPR(=3D"__counter__ % 5) =3D=3D 1"> <tr ...> </TMPL_IF> <td ...> <a href... </td> <TMPL_IF EXPR(=3D"__counter__ % 5) =3D=3D 0"> </tr> </TMPL_IF> </TMPL_LOOP> Also, you can make '5' a TMPL_VAR if needed. regards, Mathew ----- Original Message -----=20 From: "Daniel Wiener" <da...@da...> To: <htm...@li...> Sent: Wednesday, February 11, 2004 9:15 AM Subject: [htmltmpl] No image tag in IE6 > Hello. I have used and appreciated this list a great deal and now have = a question. It may not be caused by anything related to Html-Template = but if nothing else I want to remove it from the list of suspects. >=20 > The problem is that certain configurations of IE6 is not writing an = image tag in a loop. >=20 > Explanation and code fragments below -> >=20 >=20 > My template looks like this: >=20 > <!-- table for letters --> > <table border=3D"0" cellpadding=3D"0" cellspacing=3D"1"> > <tr valign=3D"top" align=3D"center"><tmpl_loop ROWS>=20 > <td bgcolor=3D"#ffffff"><p><a href=3D"/monogram/<TMPL_VAR = NAME=3DNAME>.html"><img src=3D"/letter/<TMPL_VAR NAME=3DNAME>/<TMPL_VAR = NAME=3DNAME>_<TMPL_VAR NAME=3DLETTER>.gif" width=3D"125" height=3D"125" = border=3D"0"><br> > <TMPL_VAR NAME=3DLONGNAME> <TMPL_VAR NAME=3DSET_NUMBER></a><br> > <a = href=3D"http://www.digitalriver.com/dr/v2/ec_MAIN.Entry17c?SP=3D10007&CID= =3D0&SID=3D13528&PN=3D21&PID=3D<TMPL_VAR NAME=3DDR_LINK>" = class=3D"black">Purchase This Letter</a></p> > </td> > <tmpl_if name=3Dflag> > </tr><tr valign=3D"top" align=3D"center"> > </tmpl_if> > </tmpl_loop ROWS>=20 > </tr> > </table> > <!-- end table for letters --> > =20 > =20 > I create the loop in Perl like this: >=20 > my $count =3D 1; > my $rows =3D (); > while ( $href =3D $sth->fetchrow_hashref() ) { >=20 > next if $href->{name} =3D~ /hebrew|greek/; > $href->{dr_link} =3D $href->{$letter}; > if($count =3D=3D 5) { > $href->{flag} =3D 1; > $count =3D 0; > } > push (@{$rows}, $href); > $count++; > } >=20 >=20 > This url: > http://www.embroideryarts.com/cgi-bin/intarsia/letter.cgi?letter=3Dn > should create a grid of n's. >=20 > And it does in every browser and every platform but not in certain = configurations (as yet to be determined) of IE6. >=20 > The html (when retrieved from View Source) it writes for all browsers = but IE6 is: >=20 > <table border=3D"0" cellpadding=3D"0" cellspacing=3D"1"> > <tr valign=3D"top" align=3D"center">=20 > <td bgcolor=3D"#ffffff"><p><a href=3D"/monogram/alphabet.html"><img = src=3D"/letter/alphabet/alphabet_n.gif" width=3D"125" height=3D"125" = border=3D"0"><br> > Alphabet </a><br> > <a = href=3D"http://www.digitalriver.com/dr/v2/ec_MAIN.Entry17c?SP=3D10007&CID= =3D0&SID=3D13528&PN=3D21&PID=3D1153708" class=3D"black">Purchase This = Letter</a></p> > </td> >=20 > etc. etc. to create a table... >=20 > The html (when retrieved from View Source) the script writes in IE6 = is: > <table border=3D"0" cellpadding=3D"0" cellspacing=3D"1"> > <tr valign=3D"top" align=3D"center">=20 > <td bgcolor=3D"#ffffff"><p><a href=3D"/monogram/alphabet.html"><br> > Alphabet </a><br> > <a = href=3D"http://www.digitalriver.com/dr/v2/ec_MAIN.Entry17c?SP=3D10007&CID= =3D0&SID=3D13528&PN=3D21&PID=3D1153708" class=3D"black">Purchase This = Letter</a></p> > </td> etc. >=20 > NO IMAGE TAG AT ALL. ?? >=20 > I cannot figure this out. It may be an IE6 problem unrelated to = Html-Template but any help with this would be much appreciated. >=20 > Thank you=20 >=20 > Daniel Wiener >=20 >=20 >=20 >=20 > -- > Daniel Wiener | 156 Hoyt Street | Brooklyn, NY 11217 | 718.858.1107 > http://www.danielwiener.com >=20 >=20 > ------------------------------------------------------- > The SF.Net email is sponsored by EclipseCon 2004 > Premiere Conference on Open Tools Development and Integration > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > http://www.eclipsecon.org/osdn > _______________________________________________ > Html-template-users mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/html-template-users > |
From: Mathew R. <mat...@re...> - 2004-02-10 22:36:13
|
Some possiblilties for this to be the case, is: a) you are not generating the <img...> tag in the first place = (unlikely), b) you have one of those 'ad blockers' installed; which strip out = suspect <img...> tags. The easiest way to find out - using the machine on which IE6 doesn't = produce the img tag, print the $template->output() to a file, before = sending to a browser. This will confirm that the <img...> is being = produced. Then its a matter of finding out which blocker is installed. Hope this helps, Mathew ----- Original Message -----=20 From: "Daniel Wiener" <da...@da...> To: <htm...@li...> Sent: Wednesday, February 11, 2004 9:15 AM Subject: [htmltmpl] No image tag in IE6 > Hello. I have used and appreciated this list a great deal and now have = a question. It may not be caused by anything related to Html-Template = but if nothing else I want to remove it from the list of suspects. >=20 > The problem is that certain configurations of IE6 is not writing an = image tag in a loop. >=20 > Explanation and code fragments below -> >=20 >=20 > My template looks like this: >=20 > <!-- table for letters --> > <table border=3D"0" cellpadding=3D"0" cellspacing=3D"1"> > <tr valign=3D"top" align=3D"center"><tmpl_loop ROWS>=20 > <td bgcolor=3D"#ffffff"><p><a href=3D"/monogram/<TMPL_VAR = NAME=3DNAME>.html"><img src=3D"/letter/<TMPL_VAR NAME=3DNAME>/<TMPL_VAR = NAME=3DNAME>_<TMPL_VAR NAME=3DLETTER>.gif" width=3D"125" height=3D"125" = border=3D"0"><br> > <TMPL_VAR NAME=3DLONGNAME> <TMPL_VAR NAME=3DSET_NUMBER></a><br> > <a = href=3D"http://www.digitalriver.com/dr/v2/ec_MAIN.Entry17c?SP=3D10007&CID= =3D0&SID=3D13528&PN=3D21&PID=3D<TMPL_VAR NAME=3DDR_LINK>" = class=3D"black">Purchase This Letter</a></p> > </td> > <tmpl_if name=3Dflag> > </tr><tr valign=3D"top" align=3D"center"> > </tmpl_if> > </tmpl_loop ROWS>=20 > </tr> > </table> > <!-- end table for letters --> > =20 > =20 > I create the loop in Perl like this: >=20 > my $count =3D 1; > my $rows =3D (); > while ( $href =3D $sth->fetchrow_hashref() ) { >=20 > next if $href->{name} =3D~ /hebrew|greek/; > $href->{dr_link} =3D $href->{$letter}; > if($count =3D=3D 5) { > $href->{flag} =3D 1; > $count =3D 0; > } > push (@{$rows}, $href); > $count++; > } >=20 >=20 > This url: > http://www.embroideryarts.com/cgi-bin/intarsia/letter.cgi?letter=3Dn > should create a grid of n's. >=20 > And it does in every browser and every platform but not in certain = configurations (as yet to be determined) of IE6. >=20 > The html (when retrieved from View Source) it writes for all browsers = but IE6 is: >=20 > <table border=3D"0" cellpadding=3D"0" cellspacing=3D"1"> > <tr valign=3D"top" align=3D"center">=20 > <td bgcolor=3D"#ffffff"><p><a href=3D"/monogram/alphabet.html"><img = src=3D"/letter/alphabet/alphabet_n.gif" width=3D"125" height=3D"125" = border=3D"0"><br> > Alphabet </a><br> > <a = href=3D"http://www.digitalriver.com/dr/v2/ec_MAIN.Entry17c?SP=3D10007&CID= =3D0&SID=3D13528&PN=3D21&PID=3D1153708" class=3D"black">Purchase This = Letter</a></p> > </td> >=20 > etc. etc. to create a table... >=20 > The html (when retrieved from View Source) the script writes in IE6 = is: > <table border=3D"0" cellpadding=3D"0" cellspacing=3D"1"> > <tr valign=3D"top" align=3D"center">=20 > <td bgcolor=3D"#ffffff"><p><a href=3D"/monogram/alphabet.html"><br> > Alphabet </a><br> > <a = href=3D"http://www.digitalriver.com/dr/v2/ec_MAIN.Entry17c?SP=3D10007&CID= =3D0&SID=3D13528&PN=3D21&PID=3D1153708" class=3D"black">Purchase This = Letter</a></p> > </td> etc. >=20 > NO IMAGE TAG AT ALL. ?? >=20 > I cannot figure this out. It may be an IE6 problem unrelated to = Html-Template but any help with this would be much appreciated. >=20 > Thank you=20 >=20 > Daniel Wiener >=20 >=20 >=20 >=20 > -- > Daniel Wiener | 156 Hoyt Street | Brooklyn, NY 11217 | 718.858.1107 > http://www.danielwiener.com >=20 >=20 > ------------------------------------------------------- > The SF.Net email is sponsored by EclipseCon 2004 > Premiere Conference on Open Tools Development and Integration > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > http://www.eclipsecon.org/osdn > _______________________________________________ > Html-template-users mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/html-template-users > |
From: Daniel W. <da...@da...> - 2004-02-10 22:11:17
|
Hello. I have used and appreciated this list a great deal and now have a question. It may not be caused by anything related to Html-Template but if nothing else I want to remove it from the list of suspects. The problem is that certain configurations of IE6 is not writing an image tag in a loop. Explanation and code fragments below -> My template looks like this: <!-- table for letters --> <table border="0" cellpadding="0" cellspacing="1"> <tr valign="top" align="center"><tmpl_loop ROWS> <td bgcolor="#ffffff"><p><a href="/monogram/<TMPL_VAR NAME=NAME>.html"><img src="/letter/<TMPL_VAR NAME=NAME>/<TMPL_VAR NAME=NAME>_<TMPL_VAR NAME=LETTER>.gif" width="125" height="125" border="0"><br> <TMPL_VAR NAME=LONGNAME> <TMPL_VAR NAME=SET_NUMBER></a><br> <a href="http://www.digitalriver.com/dr/v2/ec_MAIN.Entry17c?SP=10007&CID=0&SID=13528&PN=21&PID=<TMPL_VAR NAME=DR_LINK>" class="black">Purchase This Letter</a></p> </td> <tmpl_if name=flag> </tr><tr valign="top" align="center"> </tmpl_if> </tmpl_loop ROWS> </tr> </table> <!-- end table for letters --> I create the loop in Perl like this: my $count = 1; my $rows = (); while ( $href = $sth->fetchrow_hashref() ) { next if $href->{name} =~ /hebrew|greek/; $href->{dr_link} = $href->{$letter}; if($count == 5) { $href->{flag} = 1; $count = 0; } push (@{$rows}, $href); $count++; } This url: http://www.embroideryarts.com/cgi-bin/intarsia/letter.cgi?letter=n should create a grid of n's. And it does in every browser and every platform but not in certain configurations (as yet to be determined) of IE6. The html (when retrieved from View Source) it writes for all browsers but IE6 is: <table border="0" cellpadding="0" cellspacing="1"> <tr valign="top" align="center"> <td bgcolor="#ffffff"><p><a href="/monogram/alphabet.html"><img src="/letter/alphabet/alphabet_n.gif" width="125" height="125" border="0"><br> Alphabet </a><br> <a href="http://www.digitalriver.com/dr/v2/ec_MAIN.Entry17c?SP=10007&CID=0&SID=13528&PN=21&PID=1153708" class="black">Purchase This Letter</a></p> </td> etc. etc. to create a table... The html (when retrieved from View Source) the script writes in IE6 is: <table border="0" cellpadding="0" cellspacing="1"> <tr valign="top" align="center"> <td bgcolor="#ffffff"><p><a href="/monogram/alphabet.html"><br> Alphabet </a><br> <a href="http://www.digitalriver.com/dr/v2/ec_MAIN.Entry17c?SP=10007&CID=0&SID=13528&PN=21&PID=1153708" class="black">Purchase This Letter</a></p> </td> etc. NO IMAGE TAG AT ALL. ?? I cannot figure this out. It may be an IE6 problem unrelated to Html-Template but any help with this would be much appreciated. Thank you Daniel Wiener -- Daniel Wiener | 156 Hoyt Street | Brooklyn, NY 11217 | 718.858.1107 http://www.danielwiener.com |