Hi,
I want to rewrite this script in pure cgi, I really need help at this point.
I want to write a form but half of it is in one function and the other half is in the other, and I cant continue the flow of the html from one function to the next. The excerpt is as follows.

sub displayNewDeleteUpdateScreen {
my $cgi = shift;
my $operation = shift;
my $address_op;
my $TITLE = "Employee Timecards Calculation";

$address_op = "Enter New Record" if ($operation eq "ADD");
$address_op = "Enter Search Criteria For Deletion" if ($operation eq "DELETE");
$address_op = "Enter Search Criteria For Updates" if ($operation eq "UPDATE");

print $cgi->header( -bgcolor=> 'lightgrey');
print $cgi->start_html($TITLE);
print $cgi->start_form();
print $cgi->h3({ -align=>'center'}, "$address_op");
print $cgi->start_form();
print $cgi->br;
print $cgi->hr;

if ($operation eq "ADD") {
print "Enter The New Information In The Form Below\n";
print $cgi->table( { -border=>'0',
-cellpadding=> '5',
-cellspacing=> '5',
-align=> 'center'},
#HERE IS THE BREAK.........

} elsif ($operation eq "UPDATE") {
print "Enter Criteria To Query On In The Form Below.<P>\nYou will then be
able to choose entries to modify from the resulting list.\n";
print "<TABLE>";
} else {
print "Enter Criteria To Query On In The Form Below.<P>\nYou will then be
able to choose entries to delete from the resulting list.\n";
print "<TABLE>";
}

getRecordTableHTML();

print hr;
print p;

if ($operation eq "ADD") {
print p;
print submit('submit_add', 'Add This New Record');
print p;
} elsif ($operation eq "UPDATE") {
print qq` <INPUT TYPE="checkbox" NAME="exactsearch">
<STRONG>Perform Exact Search</STRONG>
<P>
<INPUT TYPE="submit" NAME="submit_query_for_update" VALUE="Query For Modification">
<P>
`;
} else {
print qq`
<INPUT TYPE="checkbox" NAME="exactsearch">
<STRONG>Perform Exact Search</STRONG>
<P>
<INPUT TYPE="submit" NAME="submit_query_for_delete"
VALUE="Query For List To Delete">
<P>
`;
}

# print the HTML footer.

print reset();
print submit('display_main_menu', 'Main Menu');
print end_form();
print end_html();

} # end of displayNewUpdateDeleteScreen




sub getRecordTableHTML {
my $cgi = shift;

#STARTS HERE AGAIN...........

Tr( { -align=>'left',
-valign=>'top'},
[
td( 'Enter Name of New Employee:',
textfield(-name=>'emp_name',
-size=>50,
-maxlength=>80)),

td( 'Enter Employee Status:',
popup_menu(-name=>'emp_status',
-values=>[qw/full_time part_time temp/],
-labels=>{'full_time'=>'one',
'part_time'=>'two',
'temp'=>'three'},
-default=>'full_time')),

td( 'Enter Hourly Rate of New Employee:',
textfield(-name=>'hr_rate',
-default=>'starting value',
-size=>5,
-maxlength=>5)),

td( 'Enter Overtime Rate of New Employee:',
textfield(-name=>'ot_rate',
-size=>5,
-maxlength=>5))
]
));

} # end of getAddressTableHTML

Any help will be greatly appreciated.

thanks,
Ebaad.


_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to