Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

My question is how can I imbed an scrolling_list in an table's row. Here's my code:
print table({-border=>"0", -cellspacings=>"10", -cellpadding=>"10", -align=>CENTER}, Tr({-align=>CENTER,-valign=>CENTER}, [ td({-colspan=>"1"}, print img {src=>"/growl.jpg", width=>"279", height=>"73", +align=>CEN TER}, ), ]), Tr({-align=>CENTER,-valign=>CENTER}, [ td({-bgcolor=>332211,-width=>"279"}, "<font size=+2> Delete Logs Files Menu </font>"), ] ), Tr({-align=>CENTER,-valign=>CENTER}, [ td({-bgcolor=>"443311",align=>CENTER}, print scrolling_list(-name=>"Logfiles",-values=>\@logs), ), ]) );
Right now it looks something like this:
scrolling list image Delete Log Files Menu 1
When I want it to look like:
image Delete Log Files Menu image
Any help?

Replies are listed 'Best First'.
(chromatic) Re: CGI.pm
by chromatic (Archbishop) on Jul 20, 2000 at 00:42 UTC
    Get rid of the print before you call CGI::scrolling_list() and it'll work. I guess CGI builds the table first, and then prints it, and the print call you put in there displays the scrolling list code before it puts it in the table. Same goes for the print before you call img().