Gossamer Forum
Home : Products : DBMan : Customization :

Add success footer position

Quote Reply
Add success footer position
I have the following code in my sub html_add_success routine:-
$page_title = "Record Added";
&html_page_top;

# < -- Start page text -- >
print qq|
<P><$font>The following record was successfully added to the database:</FONT>
|;
# < -- End page text -->

&html_record(&get_record($in{$db_key}));

&html_footer_time;
&html_page_bottom;
}

The only problem is that the html_footer_time is displayed above the record and not at the bottom of the form. I should add that I have a JPD email notification script after the %rec but before the $page_title line.
Could this be the problem? However I sometimes get the footer splitting across records say displayed between the 4th and 5th records rather than at the bottom of the window.
Thanks,
Rob

Quote Reply
Re: Add success footer position In reply to
You have somewhere left off a table statement. Can you post the link so I can see the output? I bet there is a missing </td> somewhere...

-----------
Crowe (crowe@charter.net)
Quote Reply
Re: Add success footer position In reply to
sub html_record {
# --------------------------------------------------------
# How a record will be displayed. This is used primarily in
# returning search results and how it is formatted. The record to
# be displayed will be in the %rec hash.

my (%rec) = @_; # Load any defaults to put in the VALUE field.



($db_auto_generate and print &build_html_record(%rec) and return);

my $font_color = 'Font face="Verdana, Arial, Helvetica" Size=2 Color=#003399';
my $font = 'Font face="Verdana, Arial, Helvetica" Size=2';

$rec{'Comments'} =~ s/\n/<BR>/g;

print qq|
<TABLE WIDTH="475" CELLPADDING=0 CELLSPACING=0 BORDER=1 BGCOLOR="#FFFFCC">
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>Start date of timesheet:</FONT></TD>
<TD WIDTH="80%"> <$font>$rec{'Start date of timesheet'}</Font></TD></TR>|;

if ($rec{'End date of time sheet'}) {
print qq|
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>End date of time sheet:</FONT></TD>
<TD WIDTH="80%"> <$font>$rec{'End date of time sheet'}</Font></TD></TR>
|;
}
print qq||;
if ($rec{'Basic Time Claimed'}) {
print qq|
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>Basic Time Claimed:</FONT></TD>
<TD WIDTH="80%"> <$font>$rec{'Basic Time Claimed'}</Font></TD></TR>
|;
}
print qq||;
if ($rec{'Overtime Claimed'}) {
print qq|
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>Overtime Claimed:</FONT></TD>
<TD WIDTH="80%"> <$font>$rec{'Overtime Claimed'}</Font></TD></TR>
|;
}
print qq||;
if ($rec{'Total expenses'}) {
print qq|
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>Total recharged expenses:</FONT></TD>
<TD WIDTH="80%"> <$font>$rec{'Total expenses'}</Font></TD></TR>
|;
}
print qq||;
if ($rec{'Comments'}) {
print qq|
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>Comments:</FONT></TD>
<TD WIDTH="80%"> <$font>$rec{'Comments'}</Font></TD></TR>
|;
}

print qq||;
if ($rec{'Contract_data'}) {
print qq|
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>Contract:</FONT></TD>
<TD WIDTH="80%"> <$font>$rec{'Contract_data'}</Font></TD></TR>
|;
}

print qq||;
if ($rec{'InvoiceID'}) {
print qq||;
if ($per_admin) {
print qq|
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>InvoiceID:</FONT></TD>
<TD WIDTH="80%"> <$font>$rec{'InvoiceID'}</Font></TD></TR>
|;
}
print qq|
</TABLE>
|;
}
}
Any good?

Quote Reply
Re: Add success footer position In reply to
The code you posted looks fine. The problem is elsewhere I think. There are other Table's in the html.pl file. I beleive their should be a line </td> .. Can you pust your sub html_add_success { .. thats most likely where the problem is...

-----------
Crowe (crowe@charter.net)
Quote Reply
Re: Add success footer position In reply to
Here you go, thanks....
sub html_add_success {
# --------------------------------------------------------
# The page that is returned upon a successful addition to
# the database. You should use &get_record and &html_record
# to verify that the record was inserted properly and to make
# updating easier.
%rec = &get_record($in{$db_key});
open (MAIL, "$mailprog") or &cgierr("Can't start mail program");
print MAIL "To: $admin_email\n";
print MAIL "From: $admin_email\n";
print MAIL "Subject: Test Timesheet Record Added\n\n";
print MAIL "-" x 75 . "\n\n";
print MAIL "$rec{UserID} added $rec{'Basic Time Claimed'} basic hours/days for w/c $rec{'Start date of timesheet'} to $rec{'End date of time sheet'}
and rechargeable expenses of $rec{'Total expenses'}. There was overtime claimed of $rec{'Overtime Claimed'} and $rec{UserID} said $rec{Comments}.
Timesheet id is: $rec{TimeID} against Contract: $rec{Contract_data}";
close (MAIL);
$page_title = "Record Added";
&html_page_top;

# < -- Start page text -- >
print qq|
<P><$font>The following record was successfully added to the database:</FONT>
|;
# < -- End page text -->

&html_record(&get_record($in{$db_key}));

&html_footer_time;
&html_page_bottom;
}

I have tried moving the position of the email notify with no effect.

Quote Reply
Re: Add success footer position In reply to
Okay. A couple of things.. first, can you give me a test account to login with? Feel free to do that via e-mail. (crowe@charter.net) .. I need to see the html. Also I need to see your footer/header sub routines..



-----------
Crowe (crowe@charter.net)
Quote Reply
Re: Add success footer position In reply to
Details emailed,
Thanks!! :)