Ok, I'm not very knowledgeable in the programming lingo, so if you are kind enough to provide an answer, please keep it "dumbed down" :) I currently have JPDeni's Short/Long user friendly script working, I was just wondering how to add color to the table heads. Everything I try that would work in normal HTML seems to mess the program up.
heres the
sub html_view_success {
# --------------------------------------------------------
# This page displays the results of a successful search.
# You can use the following variables when displaying your
# results:
#
# $numhits - the number of hits in this batch of results.
# $maxhits - the max number of hits displayed.
# $db_total_hits - the total number of hits.
# $db_next_hits - html for displaying the next set of results.
#
my (@hits) = @_;
my ($numhits) = ($#hits+1) / ($#db_cols+1);
my ($maxhits); $in{'mh'} ? ($maxhits = $in{'mh'}) : ($maxhits = $db_max_hits);
$in{'nh'} ? ($nh = $in{'nh'}) : ($nh = 1);
$page_title = "Search Results";
&html_page_top;
# Go through each hit and convert the array to hash and send to
# html_record for printing.
if (($db_total_hits == 1) || ($maxhits == 1)) {
&html_record_long(&array_to_hash(0, @hits));
}
else {
print qq|<p><$font>Your search returned <b>$db_total_hits</b> matches.</font>|;
if ($db_next_hits) { print "<br><$font>Pages: $db_next_hits</font>"; }
$i = 1;
print "<CENTER><TABLE border=1 cellspacing=2 cellpadding=1>\n";
print qq|<tr bgcolor="$row_color[$color]">|;
print "<TR><TD><$font>ID #</font></TD><TD><$font>Show Name</font></TD>\n";
print "<TD><$font>Held on</font></TD>\n";
print "<TD><$font>Show Grounds</font></TD>\n";
print "<TD><$font>Run By</font></TD>\n";
print "<TD><$font>Type</font></TD></TR>\n";
print "<CENTER>";
for (0 .. $numhits - 1) {
print "<tr>";
&html_record (&array_to_hash($_, @hits));
print "</tr>";
++$i;
}
print "</table>";
if ($db_next_hits) { print "<br><$font>Pages: $db_next_hits</font>";}
}
&html_footer;
&html_page_bottom;
}
---------------------
If you could offer any kind of help that would be great :)
heres the
sub html_view_success {
# --------------------------------------------------------
# This page displays the results of a successful search.
# You can use the following variables when displaying your
# results:
#
# $numhits - the number of hits in this batch of results.
# $maxhits - the max number of hits displayed.
# $db_total_hits - the total number of hits.
# $db_next_hits - html for displaying the next set of results.
#
my (@hits) = @_;
my ($numhits) = ($#hits+1) / ($#db_cols+1);
my ($maxhits); $in{'mh'} ? ($maxhits = $in{'mh'}) : ($maxhits = $db_max_hits);
$in{'nh'} ? ($nh = $in{'nh'}) : ($nh = 1);
$page_title = "Search Results";
&html_page_top;
# Go through each hit and convert the array to hash and send to
# html_record for printing.
if (($db_total_hits == 1) || ($maxhits == 1)) {
&html_record_long(&array_to_hash(0, @hits));
}
else {
print qq|<p><$font>Your search returned <b>$db_total_hits</b> matches.</font>|;
if ($db_next_hits) { print "<br><$font>Pages: $db_next_hits</font>"; }
$i = 1;
print "<CENTER><TABLE border=1 cellspacing=2 cellpadding=1>\n";
print qq|<tr bgcolor="$row_color[$color]">|;
print "<TR><TD><$font>ID #</font></TD><TD><$font>Show Name</font></TD>\n";
print "<TD><$font>Held on</font></TD>\n";
print "<TD><$font>Show Grounds</font></TD>\n";
print "<TD><$font>Run By</font></TD>\n";
print "<TD><$font>Type</font></TD></TR>\n";
print "<CENTER>";
for (0 .. $numhits - 1) {
print "<tr>";
&html_record (&array_to_hash($_, @hits));
print "</tr>";
++$i;
}
print "</table>";
if ($db_next_hits) { print "<br><$font>Pages: $db_next_hits</font>";}
}
&html_footer;
&html_page_bottom;
}
---------------------
If you could offer any kind of help that would be great :)

