Gossamer Forum
Home : Products : DBMan : Customization :

Getting A Value

Quote Reply
Getting A Value
Have a subroutine in html.pl and want to pull one value for html display

Thanks - John

Example:

Code:


sub html_footer1 {
my (%rec) = @_;
&html_print_headers;

print qq|
<html>
<head> <title> Title Of Your Site Here</title> </head>

<body>
Content :: |; $rec{'URL'} print qq|
<!-- Content :: |; &html_record(&get_record($in{$db_key})); print qq| -->

</body>
</html>
|;
}
Quote Reply
Re: [gatman] Getting A Value In reply to
Have also tried to getting the value from setting up a sub routine in db.cgi. I am able to pass a test value of output to my html.pl subroutine, but require the URL value of one record

sub My_Footer {
# --------------

$output .= "I Need The URL Field Here";
} return $output;
}
Quote Reply
Re: [gatman] Getting A Value In reply to
Anybody??
Quote Reply
Re: [gatman] Getting A Value In reply to
If this has been address in another thread please advise - I have been staring at these subroutines for hours and I must be missing something covered at one time or documented somewhere.

Here exactly what I am trying to do. Live example:
>Details


Click Second Record=> "More Info" - frames open and center frame is to be $rec{'URL'} value

Details:
I have added frames in db.cgi

elsif ($in{'frame'}) { if ($per_view) { &html_frame; }
else { &html_unauth; } }
elsif ($in{'main_menu'}) { if ($per_view) { &html_main_menu; }
else { &html_unauth; } }
elsif ($in{'top'}) { if ($per_view) { &html_top; }
else { &html_unauth; } }
elsif ($in{'footer'}) { if ($per_view) { &html_footer2; }
else { &html_unauth; } }

===================

I have added in sub html_record - html.pl

<td width="20%" valign="top" align="left">
|;

if (length($rec{'URL'}) > 7) {
print qq|<a href=\"$db_script_link_url&$db_key=$rec{$db_key}&frame=1\">More Info</a> |;
}

print qq|
</td>

==========

I have added frames subroutine in html.pl

sub html_frame {
############

&html_print_headers;

print qq|
<html>
<head></head>

<frameset rows="90,*,50">
<frame name="header" src="$db_script_link_url&top=1" target="_parent" frameborder="no" scrolling="no" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<frame name="main" src="|;

##### HERE
#print "$db_script_link_url- NEED PATH TO $rec{'URL'}";
#####

print qq|" target="main" frameborder="no" scrolling="auto" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

<frame name="footer" src="$db_script_link_url&footer=1" target="_parent" frameborder="no" scrolling="no" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
</frameset>
</body>
</html>
|;

}



Thanks - John

Last edited by:

gatman: Aug 4, 2003, 7:40 AM