Specials | Announcements | Contact | Site Map
Willmaster.com
Hijack-proof forms. Surveys. List building.

Solid, safe website tools.

Whatever your need, Will Bontrager builds powerful software solutions.

Affiliate Cookie Setter
Search WillMaster.com:

WillMaster > Support > CGI Q&A

If you don't find the answer to your question in these archives, ask your CGI question at the Current Master Series CGI Forum.

automatic frame bug?

Author Message
6Mar02

Byron Solomon
Subject: automatic frame bug?

Hello to all!

I tried using an automatic frame CGI script (located at http://html.about.com/library/weekly/aa022800a.htm) but it seems to have a bug. I asked the author for help, but haven't received a response yet. The frame will show up when an outside link is clicked, but the return link won't return to the originating site. It blanks the page and refreshes the linked site, keeping the frame at the top. The "remove this frame" link works fine.

Can you offer any assistance?

More info: the page with the cgi link is at http://www.yesaroun.com/news.html, and the cgi link is "TownOnline article".

Below is the cgi:

#!/usr/bin/perl
# frameit.cgi copyright 2000 Jennifer Kyrnin

use strict;
$| = 1;

delete @ENV{"IFS", "CDPATH", "ENV", "BASH_ENV"};

$ENV{PATH} = "/bin:/usr/bin";
use CGI; use CGI::Carp 'fatalsToBrowser';
my $q = new CGI;

# if there is no parameter, re-open the last page.
if (!$q->param())
{
my $url = $q->referer() ?
$q->referer() :
"http://www.yesaroun.com/";
print $q->redirect("$url");
} elsif ($q->param("top")) {
&buildtop;
} else {
&buildframe;
}

sub buildframe
{
# get the URL to open in
# the bottom frame from the post...
my $url = "";
$url = $q->param("url") ?
$q->param("url") :
"http://www.yesaroun.com/";

my $refer = "";
$refer = $q->referer() ?
$q->referer() :
"http://www.yesaroun.com/";

# get the URL to open in
# the top frame from the post
my $top = "";
$top =
"frameit.cgi?top=y&url=$url&refer=$refer";
# build the HTML and print it
print $q->header;
print << "EOF";



yesaroun' Duo





<br>Please <a href="$url">Click here</a> to go to the page.<br>


EOF
;
}

sub buildtop
{
# get the URL to open in the bottom
# frame from the post...
my $url = "";
$url = $q->param("url") ?
$q->param("url") :
"http://www.yesaroun.com/";

my $refer = "";
$refer = $q->referer() ?
$q->referer() :
"http://www.yesaroun.com/";

print $q->header;
print << "EOF";



Navigation Frame







Return to yesaroun.comRemove this frame



EOF
;
}

Thank you for your time and any help offered.

-Byron Solomon

6Mar02

Will
In response to: automatic frame bug?

I wish I had time to try this script, but I don't. You did right in contacting the author about this, s/he will take a lot less time in answering your question than some who would need to install and study the script first.

Remember, it might not be a bug but just an incorrect implementation. If the script works on many other sites but not on yours, it's likely an implementation error. But then, it might actually be a bug.

Like I said, I wish I had time to test it.

Maybe someone else on the forum wants to take a crack at it?

6Mar02

Byron Solomon
In response to: automatic frame bug?

Thanks, Will. I hope someone can help with the problem. I've waited for a while already... I suppose I can wait a while longer. :>

7Mar02

Byron Solomon
In response to: automatic frame bug?

Thanks, Will. I hope someone can help with the problem. I've waited for a while already... I suppose I can wait a while longer. :>