Okay. The first one it is.
You'll probably want to make your columns a separate subroutine from html_record, or your delete form and modify form will be messed up. It's a lot easier to make the record display into columns than it is the delete form and modify form, since they have an extra checkbox or radio button.
Create a new subroutine
Code:
sub html_record_columns {
my (%rec) = @_;
unless ($i % 2) { print "<TR>"; }
print "<TD> [your record display] </TD>";
if ($i % 2) { print "</TR>";
}
In html_view success, instead of
Code:
for (0 .. $numhits - 1) {
print "<P>";
&html_record (&array_to_hash($_, @hits));
}
use
Code:
$i=0;
print "<table>";
for (0 .. $numhits - 1) {
&html_record_columns (&array_to_hash($_, @hits));
++$i;
}
if ($i % 2) { print "<TD>& n b s p; </TD></TR>"; }
print "</table>";
(I had to put spaces in the & n b s p; so it would print out. It's just there for a space holder in case you have an odd number of records.)
If you should want to change it to three columns, you can't just change the 2 to a 3. You can make three (or four or 73), but the process is a little different.
------------------
JPD
[This message has been edited by JPDeni (edited May 16, 1999).]