sara2005 has asked for the wisdom of the Perl Monks concerning the following question:
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.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Creating a table using cgi.pm - a unique problem
by Zed_Lopez (Chaplain) on Oct 28, 2005 at 23:00 UTC | |
by ph713 (Pilgrim) on Oct 29, 2005 at 00:35 UTC | |
Re: Creating a table using cgi.pm - a unique problem
by ph713 (Pilgrim) on Oct 28, 2005 at 22:37 UTC | |
Re: Creating a table using cgi.pm - a unique problem
by pg (Canon) on Oct 29, 2005 at 00:47 UTC | |
by sara2005 (Scribe) on Oct 31, 2005 at 14:37 UTC | |
Re: Creating a table using cgi.pm - a unique problem
by kwaping (Priest) on Oct 28, 2005 at 22:46 UTC | |
by pg (Canon) on Oct 29, 2005 at 00:58 UTC |