Below is the part of the code that creates the table:- I create several columns in the table and my requirement is that a javascript should be triggered when I click on any column except the first one.
Everything is fine except that I don't need "javascript:dothis()" in the first column. I am not able to get rid of that in the first column bcoz the format , td( { -OnClick=>"javascript:dothis()" }, ensures that the javascript is added to each and every column in the table row$cgi->Tr({ -align=>LEFT, -valign=>TOP}, [ td( { -OnClick=>"javascript:dothis()" }, [ $cgi->a( {-href=>"..", -target=>"_new"}, $cgi->img(..)), $cgi->a( {..}, $value1 ), $cgi->hidden( -name=>'name2', -value=>'$value2' ). $cgi->a( $value2), $cgi->hidden( -name=>'name3', -value=>'$value3' ). $cgi->a( $value2) ]), ]); which creates the html code as follows:- <tr valign="TOP" align="LEFT"> <td onclick="javascript:dothis()"> <a target="_new" href=".."><img src=.../></a></td> <td onclick="javascript:dothis()"> <a>VARIABLE</a></td> <td onclick="javascript:dothis()"> <input type="hidden" name=".."value=".."/><a>..</a></td> <td onclick="javascript:dothis()"> <input type="hidden" name=".."value=".."/><a>..</a></td> </tr>
Is there a way to overcome this problem or I should create the html tags manually rather than using cgi.pm? I would appreciate any help in this regard.
In reply to Creating a table using cgi.pm - a unique problem by sara2005
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |