Gossamer Forum
Quote Reply
Re: [rascal] Fix Global In reply to
sub {
my ($category,$output);
my $db= $DB->table('Category') || return $GT::SQL::error;
$db->select_options('ORDER BY Full_Name') || return $GT::SQL::error;
my $sth = $db->select( ['ID','Full_Name', 'CatDepth', 'Number_of_Links'] ) || return $GT::SQL::error;
$output .= qq|<select name="nnn-DeptSelect" onchange="top.location=this.options[this.selectedIndex].value" size="1">\n|;
$output .= qq|<option selected>Website Categories</option>\n|;
while (my ($id,$full_name, $depth, $cnt) = $sth->fetchrow_array) {
my $safe_full = $full_name;
my @cut = split /\//, $full_name;
my $back = '';
for (my $i=0; $i < $#cut; $i++) {
$back .= q|&nbsp;&nbsp;|;
}
$back .= $cut[$#cut];
$output .= qq|<option value="$CFG->{build_root_url}/| . $db->as_url($safe_full) . qq|/$CFG->{build_index}">$back ($cnt)</option>|. "\n";
}
$output .= "</select>\n";
return \$output;
}


=========================================

try this one


Sandra Roussel
Chonsa Group Design - Fresh Start Housing
Subject Author Views Date
Thread Fix Global rascal 5140 Dec 22, 2006, 10:43 PM
Thread Re: [rascal] Fix Global
SandraR 5031 Dec 23, 2006, 8:18 AM
Thread Re: [SandraR] Fix Global
rascal 5009 Dec 23, 2006, 4:30 PM
Thread Re: [rascal] Fix Global
SandraR 5010 Dec 23, 2006, 6:21 PM
Thread Re: [SandraR] Fix Global
rascal 4966 Jan 17, 2007, 9:01 PM
Thread Re: [rascal] Fix Global
tandat 4957 Jan 17, 2007, 10:20 PM
Thread Re: [tandat] Fix Global
rascal 4942 Jan 18, 2007, 8:23 AM
Thread Re: [rascal] Fix Global
tandat 4953 Jan 18, 2007, 8:37 AM
Post Re: [tandat] Fix Global
rascal 4920 Jan 18, 2007, 8:47 PM
Post Re: [rascal] Fix Global
Andy 4864 Mar 9, 2007, 12:34 AM