> -----Original Message-----
> From: Omar Shariff [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August 01, 2002 10:47 AM
> To: [EMAIL PROTECTED]
> Subject: Frame
>
>
> Hi, i'm trying to do something like this, a page that
> ask a number and then executes a perl cgi and return
> data from the database. I do that, now i want that the
> cgi (when i press the button in the number page)
> return two frames, upper frame with one datas and down
> frame with other, i don't know how do it, because the
> frame page (the page that content the other pages)
> have the tag SCR= and here the page and that page not
> exists is a cgi return.... how can i do it??
> thanks
Displaying such a result requires 3 requests:
1. A frameset to define the two frames
2. Content of top frame
3. Content of bottom frame
All 3 requests can be served by the same script. Here's a simple
example to return a frameset and two frames with content:
#!/usr/bin/perl
use CGI;
my $q = new CGI;
print $q->header;
if ($q->param('frame') eq 'top') {
print $q->start_html,
$q->p('This is top frame'),
$q->end_html;
} elsif ($q->param('frame') eq 'bottom') {
print $q->start_html,
$q->p('This is bottom frame'),
$q->end_html;
} else {
print $q->html(
$q->head({-title=>'Frameset Test'}),
$q->frameset({-rows=>'100,*'},
$q->frame({-name=>'ft', -src=>$q->url . '?frame=top'}),
$q->frame({-name=>'fb', -src=>$q->url . '?frame=bottom'}),
),
);
}
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]