Nath, Alok (STSD) am Dienstag, 18. Juli 2006 15:30: > Hi, > In my current program I am not sure where to > use rowSpan so that I create table like below. > In otherwords, I want switch 1 to appear > once only for the two rows. > > My main constraint is I dont want to change the program > style to create such a table . > > Any help will be greatly appreciated. > > |--------------|------------| > | > |--------------|------------| > | > | | Cell B | > | > |switch1 |------------| > | > | | Cell C | > | > |--------------|------------| > > print $cgi->table({ > -border=>undef, > -width=>'100%', > -height=>'20%', > -colSpan => 10, > }, > $cgi->Tr({ > -align=>'center', > -valign=>'top' > }, > [ > $cgi->th([ > "Network Switch", > "Slot 1", > "Slot 2", > "Network Switch"]), > ]), > $cgi->Tr({ > -align=>'center', > -valign=>'middle', > > }, > [ > $cgi->td([ > '{-rowSpan=> 2},Switch 1', > 'CayenneE-1_B-1 ', > 'CayenneE-1_B-2', > "Switch 2" > ]), > ]), > $cgi->Tr({ > -align=>'center', > -valign=>'middle', > }, > [ > $cgi->td([ > 'Switch 1', > 'CayenneE-1 ', > 'No Blade', > "Switch 2" > ]), > ]), > > ) ;
Hi Alok, Rob, all, Can anybody tell me what's the advantage of using CGI to produce a table with constant structure from constant strings over a simple: print q( <table height="20%" border colspan="10" width="100%"> <tr align="center" valign="top"> <th>Network Switch</th> <th>Slot 1</th> <th>Slot 2</th> <th>Network Switch</th> </tr> <tr align="center" valign="middle"> <td rowspan="2">Switch 1</td> <td>CayenneE-1_B-1</td> <td>CayenneE-1_B-2</td> <td>Switch 2</td> </tr> <tr align="center" valign="middle"> <td>CayenneE-1 </td> <td>No Blade</td> <td>Switch 2</td> </tr> </table> ); ? If you want, say: add an additional column, you have to insert several td producing statements (or strings respectively) in differenent places in both cases. Ok, chances are maybe bigger to produce correct (x)html with CGI, is it that? (but why not use a validating parser to test the result anyway?) Am I missing something? Dani -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>