I haven't used cgi.pm in a long time, and I don't even remember using syntax like that (and come to think of it, the syntax as shown doesn't even make much sense in nesting terms, I think there's some typos in there), but I would have to guess that this sort of structural change would do it:

$cgi->Tr({ -align=>LEFT, -valign=>TOP}, [ td( { }, [ $cgi->a( {-href=>"..", -target=>"_new"} ) . $cgi->img(..) ] ), td( { -OnClick=>"javascript:dothis()" }, [ $cgi->a( {..}, $value1 ), $cgi->hidden( -name=>'name2', -value=>'$value2' ). $cgi->a( $value2), $cgi->hidden( -name=>'name3', -value=>'$value3' ). $cgi->a( $value2) ]), ]);

Basically, split that td clause into two seperate ones, one without the javascript attribute containing the first td, and one with it containing the other three.


In reply to Re: Creating a table using cgi.pm - a unique problem by ph713
in thread Creating a table using cgi.pm - a unique problem by sara2005

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.