joncotter
asked on
targeting multiple frame windows or a frameset
Anybody know how to target more than one frame window with a basic form script? I want the form (on the left side of the page) to refresh the two right side frame windows with information entered from the form.
Would a SSI be a better solution?
jon
Would a SSI be a better solution?
jon
ASKER
Oso suggested, building a new frameset out of a CGI (perl) script. How do you do that?
j
j
You just print out a new frame with help of HTML.
ASKER
Yes obviously, but I am trying to target more than one window. that would require using PRINT to produce three seperate HTML files; the "frameset" page and both of the "framesrc" pages.
How can you get a perl script to print multiple HTML pages?
How can you get a perl script to print multiple HTML pages?
#!/usr/bin/perl
use CGI qw(:standard);
$query = new CGI;
$path_info = path_info;
print header;
if( !$path_info || $path_info eq '/' ){
$script_name = script_name;
$left=param('left')||'left ';
$right=param('right')||'ri ght';
if( $right > 8000000000 ){
$rightsource="https://www.experts-exchange.com/topics/bin/ShowQ?qid=$right";
}else{
$rightsource="$script_name /right?par am=$right" ;
}
print <<HERE;
<html><head><title>targeti ng multiple frame windows or a framese</title></head>
<frameset cols="50,50">
<frame src="$script_name/left?par am=$left" name="left">
<frame src="$rightsource" name="right">
</frameset>
HERE
exit;
}
if( $path_info=~/left/ ){
$param = param('param');
print <<HERE;
left = $param<br>
<a href="$script_name?left=1& right=2" target="_top">[1,2]</a>
<br>
<a href="$script_name?left=3& right=8630 021498" target="_top">
[3,8630021498]</a>
HERE
}
if( $path_info=~/right/ ){;
$param = param('param');
print <<HERE;
right = $param<br>
<a href="$script_name?left=A& right=B" target="_top">[A,B]</a>
<br>
<a href="$script_name?left=C& right=D" target="_top">[C,D]</a>
HERE
}
use CGI qw(:standard);
$query = new CGI;
$path_info = path_info;
print header;
if( !$path_info || $path_info eq '/' ){
$script_name = script_name;
$left=param('left')||'left
$right=param('right')||'ri
if( $right > 8000000000 ){
$rightsource="https://www.experts-exchange.com/topics/bin/ShowQ?qid=$right";
}else{
$rightsource="$script_name
}
print <<HERE;
<html><head><title>targeti
<frameset cols="50,50">
<frame src="$script_name/left?par
<frame src="$rightsource" name="right">
</frameset>
HERE
exit;
}
if( $path_info=~/left/ ){
$param = param('param');
print <<HERE;
left = $param<br>
<a href="$script_name?left=1&
<br>
<a href="$script_name?left=3&
[3,8630021498]</a>
HERE
}
if( $path_info=~/right/ ){;
$param = param('param');
print <<HERE;
right = $param<br>
<a href="$script_name?left=A&
<br>
<a href="$script_name?left=C&
HERE
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Maybe Java or JavaScript (or since you're posting this here, PerlScript,
although there aren't as many browsers currently supporting that)
From the CGI side, the easiest thing to do would be to build a new frameset.