Re: [htmltmpl] No image tag in IE6
Brought to you by:
samtregar
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 > |