Thread: [htmltmpl] HTML::Template - need to merge the columns of a table
Brought to you by:
samtregar
From: Senthil N. <rs...@gm...> - 2005-12-14 19:19:29
|
Hi All, I need to merge the columns of a table during runtime in HTNL Template. I have a bool variable set, whenever the cells needs to be merged. So, chking for that var if its set, need to merge the cells else need to have the cells as defined earlier. How this can be done in HTML::Template?? Thanks Senthil |
From: Dan H. <dan...@re...> - 2005-12-14 19:52:39
|
<tmpl_if my_flag> <!-- merged cells here --> <tmpl_else> <!-- non-merged cells--> </tmpl_if> -----Original Message----- From: htm...@li... [mailto:htm...@li...] On Behalf Of Senthil Nathan Sent: Thursday, 15 December 2005 08:19 To: Htm...@li... Subject: [htmltmpl] HTML::Template - need to merge the columns of a table Hi All, I need to merge the columns of a table during runtime in HTNL Template. I have a bool variable set, whenever the cells needs to be merged. So, chking for that var if its set, need to merge the cells else need to have the cells as defined earlier. How this can be done in HTML::Template?? Thanks Senthil |
From: Senthil N. <rs...@gm...> - 2005-12-14 19:59:34
|
hey, thats not the one i expect. i tell the first row with the spacing as some amount of % and then check fo= r the bool var inside that loop. sample code is here, <TABLE BORDER=3D0 cellpadding=3D"0" width=3D"100%"> <TR bgcolor=3D"87b77b"> <td width=3D"15%" align=3D"center"> <font face=3D"Arial" size=3D"2"><b>Job ID</b></font></td> <td width=3D"10%" align=3D"center"> <font face=3D"Arial" size=3D"2"><b>Passed</b></font></td> <td width=3D"10%" align=3D"center"> <font face=3D"Arial" size=3D"2"><b>Failed</b></font></td> <td width=3D"10%" align=3D"center"> <font face=3D"Arial" size=3D"2"><b>Total</b></font></td> </TR> <TMPL_LOOP NAME=3D"job_loop"> <TD align=3D"center"><a href=3D"hiGuiResultsBrowser.cgi?jobid=3D<TM= PL_VAR NAME =3D"job_id">"> <TMPL_VAR NAME=3D"job_id"></TD> <TMPL_IF rep_found> <TD>Reports are missing in the location</TD> ------> this comes under only one column. remaining 2 columns are empty. i would like to merge all the columns and display. <TMPL_ELSE> <TD align=3D"center"><TMPL_VAR NAME=3D"passed"></TD> <TD align=3D"center"><TMPL_VAR NAME=3D"failed"></TD> <TD align=3D"center"><TMPL_VAR NAME=3D"total"></TD> </TMPL_IF> </TR> </TMPL_LOOP> </TABLE> On 12/15/05, Dan Horne <dan...@re...> wrote: > > <tmpl_if my_flag> > <!-- merged cells here --> > <tmpl_else> > <!-- non-merged cells--> > </tmpl_if> > > -----Original Message----- > *From:* htm...@li... [mailto: > htm...@li...] *On Behalf Of *Senthil > Nathan > *Sent:* Thursday, 15 December 2005 08:19 > *To:* Htm...@li... > *Subject:* [htmltmpl] HTML::Template - need to merge the columns of a > table > > Hi All, > > I need to merge the columns of a table during runtime in HTNL Template. > > I have a bool variable set, whenever the cells needs to be merged. > So, chking for that var if its set, need to merge the cells else need to > have the cells as defined earlier. > > How this can be done in HTML::Template?? > > Thanks > Senthil > > |
From: Dan H. <dan...@re...> - 2005-12-14 20:14:55
|
If I understand you correctly, this has nothing to do with = HTML::Template ... you need to use the colspan attribute on your TD tag =20 <td colspan=3D"3"> ( or 4 or how ever many columns you want to span) -----Original Message----- From: Senthil Nathan [mailto:rs...@gm...]=20 Sent: Thursday, 15 December 2005 08:59 To: dan...@re... Cc: Htm...@li... Subject: Re: [htmltmpl] HTML::Template - need to merge the columns of a table hey, thats not the one i expect. i tell the first row with the spacing as some amount of % and then check = for the bool var inside that loop. sample code is here, <TABLE BORDER=3D0 cellpadding=3D"0" width=3D"100%">=20 <TR bgcolor=3D"87b77b"> <td width=3D"15%" align=3D"center"> <font face=3D"Arial" size=3D"2"><b>Job ID</b></font></td>=20 <td width=3D"10%" align=3D"center"> <font face=3D"Arial" size=3D"2"><b>Passed</b></font></td> <td width=3D"10%" align=3D"center">=20 <font face=3D"Arial" size=3D"2"><b>Failed</b></font></td> <td width=3D"10%" align=3D"center"> <font face=3D"Arial" size=3D"2"><b>Total</b></font></td>=20 </TR> <TMPL_LOOP NAME=3D"job_loop"> <TD align=3D"center"><a = href=3D"hiGuiResultsBrowser.cgi?jobid=3D<TMPL_VAR NAME =3D"job_id">"> <TMPL_VAR NAME=3D"job_id"></TD>=20 <TMPL_IF rep_found> <TD>Reports are missing in the location</TD> ------> = this comes under only one column. remaining 2 columns are empty. i would like = to merge all the columns and display.=20 <TMPL_ELSE> <TD align=3D"center"><TMPL_VAR NAME=3D"passed"></TD> <TD align=3D"center"><TMPL_VAR NAME=3D"failed"></TD>=20 <TD align=3D"center"><TMPL_VAR NAME=3D"total"></TD> </TMPL_IF> </TR> </TMPL_LOOP> </TABLE> On 12/15/05, Dan Horne <dan...@re...> wrote:=20 <tmpl_if my_flag> <!-- merged cells here --> <tmpl_else> <!-- non-merged cells--> </tmpl_if> -----Original Message----- From: htm...@li... [mailto:htm...@li...] On Behalf Of Senthil Nathan Sent: Thursday, 15 December 2005 08:19 To: Htm...@li... Subject: [htmltmpl] HTML::Template - need to merge the columns of a = table Hi All, I need to merge the columns of a table during runtime in HTNL Template. I have a bool variable set, whenever the cells needs to be merged. So, chking for that var if its set, need to merge the cells else need to have the cells as defined earlier.=20 How this can be done in HTML::Template?? Thanks Senthil |
From: Senthil N. <rs...@gm...> - 2005-12-14 20:18:26
|
Thanks a lot!!!!!!!!!!!!! This is what i wanted. So, need to use the tag, colspan with TD. Cool. Senthil On 12/15/05, Dan Horne <dan...@re...> wrote: > > If I understand you correctly, this has nothing to do with HTML::Template= ... you need to use the colspan attribute on your TD tag > > <td colspan=3D"3"> ( or 4 or how ever many columns you want to span) > > -----Original Message----- > *From:* Senthil Nathan [mailto:rs...@gm...] > *Sent:* Thursday, 15 December 2005 08:59 > *To:* dan...@re... > *Cc:* Htm...@li... > *Subject:* Re: [htmltmpl] HTML::Template - need to merge the columns of a > table > > hey, > > thats not the one i expect. > i tell the first row with the spacing as some amount of % and then check > for the bool var inside that loop. > > sample code is here, > <TABLE BORDER=3D0 cellpadding=3D"0" width=3D"100%"> > > <TR bgcolor=3D"87b77b"> > <td width=3D"15%" align=3D"center"> > <font face=3D"Arial" size=3D"2"><b>Job ID</b></font></td> > <td width=3D"10%" align=3D"center"> > <font face=3D"Arial" size=3D"2"><b>Passed</b></font></td> > <td width=3D"10%" align=3D"center"> > <font face=3D"Arial" size=3D"2"><b>Failed</b></font></td> > <td width=3D"10%" align=3D"center"> > <font face=3D"Arial" size=3D"2"><b>Total</b></font></td> > </TR> > > <TMPL_LOOP NAME=3D"job_loop"> > > <TD align=3D"center"><a href=3D"hiGuiResultsBrowser.cgi?jobid=3D<= TMPL_VAR > NAME > =3D"job_id">"> <TMPL_VAR NAME=3D"job_id"></TD> > > <TMPL_IF rep_found> > <TD>Reports are missing in the location</TD> ------> this > comes under only one column. remaining 2 columns are empty. i would like = to > merge all the columns and display. > <TMPL_ELSE> > <TD align=3D"center"><TMPL_VAR NAME=3D"passed"></TD> > <TD align=3D"center"><TMPL_VAR NAME=3D"failed"></TD> > <TD align=3D"center"><TMPL_VAR NAME=3D"total"></TD> > </TMPL_IF> > > </TR> > </TMPL_LOOP> > > </TABLE> > > > On 12/15/05, Dan Horne <dan...@re...> wrote: > > > > <tmpl_if my_flag> > > <!-- merged cells here --> > > <tmpl_else> > > <!-- non-merged cells--> > > </tmpl_if> > > > > -----Original Message----- > > *From:* htm...@li... [mailto: > > htm...@li...] *On Behalf Of *Senthil > > Nathan > > *Sent:* Thursday, 15 December 2005 08:19 > > *To:* Htm...@li... > > *Subject:* [htmltmpl] HTML::Template - need to merge the columns of a > > table > > > > Hi All, > > > > I need to merge the columns of a table during runtime in HTNL Template. > > > > I have a bool variable set, whenever the cells needs to be merged. > > So, chking for that var if its set, need to merge the cells else need t= o > > have the cells as defined earlier. > > > > How this can be done in HTML::Template?? > > > > Thanks > > Senthil > > > > > |