right now i have the 2 column display and it works fine, but now i want 4 columns.. ive tried one mod but then i click on the long display it always takes me to the first record. this is my code:
sub html_view_success {
# --------------------------------------------------------
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 ($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>"; }
$rec_count = 1;
print "<table>";
print "<table>";
for (0 .. $numhits - 1) {
$i = $_;
unless ($i % 2) {
print "<tr>";
}
print "<td>";
&html_record (&array_to_hash($_, @hits));
print "</td>";
if ($i % 2) {
print "</tr>";
}
++$rec_count;
}
if ($numhits % 2) {
print "<td> </td></tr>";
}
print "</table>";
print "</tr>";
++$rec_count;
}
print "</table>";
if ($db_next_hits) { print "<br><$font>Pages: $db_next_hits</font>";}
print qq|</td></tr>
</table>
</blockquote>
</body>
</html>
|;
}
what can i change to that to make it display 4 columns?
thanks in advance,
jake
sub html_view_success {
# --------------------------------------------------------
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 ($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>"; }
$rec_count = 1;
print "<table>";
print "<table>";
for (0 .. $numhits - 1) {
$i = $_;
unless ($i % 2) {
print "<tr>";
}
print "<td>";
&html_record (&array_to_hash($_, @hits));
print "</td>";
if ($i % 2) {
print "</tr>";
}
++$rec_count;
}
if ($numhits % 2) {
print "<td> </td></tr>";
}
print "</table>";
print "</tr>";
++$rec_count;
}
print "</table>";
if ($db_next_hits) { print "<br><$font>Pages: $db_next_hits</font>";}
print qq|</td></tr>
</table>
</blockquote>
</body>
</html>
|;
}
what can i change to that to make it display 4 columns?
thanks in advance,
jake