First of all, please check the generated HTML (javascript) code, and see if there is anything abnormal about it. That is always your best bet to debug these sorts of things.
Second, you ought to learn how to use Mason as a templating language. The Mason book is available for free online reading. Please read about the different blocks available (<%args>, <%init> at the very least), and for $DEITY's sake, please do not embed that much code in the middle of your HTML. Mason is fairly good in separating code and HTML. Here's your code rewritten:
<%args> $foo $bar $baz $biz </%args> ... your html code ... deletes += <% $del_count %>; if(deletes > 0) { return confirm('Delete ' . + deletes + . 'Items? '); } ... your html code ... <%init> my @update = split(/,/, $biz); my $del_count = 0; if ($baz == 2 and and{ $tab_id == $_ } @update) { # ??? foreach ($foo, $bar) { $del_count += scalar split(/,/, $_); } } </%init>
I don't know what is wrong with your code, but I do wonder what and{ $tab_id == $_ } @update is supposed to mean...
In reply to Re: Help with Perl/Catalyst/Mason
by Anonymous Monk
in thread Help with Perl/Catalyst/Mason
by sharkeyph
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |