• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 147
  • Last Modified:

Creating frames

I have created frames ... and I want the LEFT side to be static and the RIGHT side should show the results...
how to do this ?

For ex. pls. check out my site at

Awaiting a response
  • 2
  • 2
1 Solution
Make the form tag like this:

<form name="your_form" ACTION="your_actionpage" method="GET" target="your_rightframe">

sdesarAuthor Commented:
I am still getting the output on the left side.

I can't figure out why this is occuring eventhough I am getting correct results in the respective files

 have included the files that this effects... hope this helps!!!!!!!

Thanks for the response!!!!!

The suggestion you made i did it on my frames .html page

                        <TITLE>Page with targeting</TITLE>
                      <FRAMESET COLS="30%,70%">
<form name="url_fetch.html" ACTION="hello.html" method="GET"
                        <FRAME SRC=url_fetch.html>
                        <FRAME SRC=fr-txt11.html NAME="results">

And here the .cgi File where I enter in the URL -


use LWP::Simple;
use HTML::Parser;
use CGI;

my $cgi = new CGI;
my $url = $cgi->param('url');

my $HTTP_ROOT = "/web/public/grad/sdesar/file.txt";
my $HTTP_ROOT1 = "/web/public/grad/sdesar/file.html";

if ( $url ne "" )
$content = fetch( $url );
if ( $content ne "" )
print $cgi->header( -type => 'text/plain' );
my $plain_text = plain_text($content);
print $plain_text;
print $content;                    
my $plain_text = plain_text( $content );

print $plain_text, "\n";

cp_to_file( $plain_text, "$HTTP_ROOT" );
print $cgi->redirect( "/file.txt" );

##########copy the HTML

print $cgi->header( -type => 'text/plain' );
my $cp_to_file_html = cp_to_file_html($content);
print $cp_to_file_html;
print $content;
my $cp_to_file_html = cp_to_file_html( $content );

print $cp_to_file_html, "\n";

cp_to_file_html( $cp_to_file_html, "$HTTP_ROOT1" );
print $cgi->redirect( "/file.html" );

output_form( "Could not load URL: $url<br>" );
   sub output_form
my $msg = shift;

# output the html header
print $cgi->header( -type => 'text/html' );

# print the message if there is one
print "$msg<br>\n";

# output the form for the user
print $cgi->start_html;
print $cgi->start_form;
print "Please enter another URL:  ";  
print $cgi->textfield( -name=>'url', -override=>' ' );
#print $cgi->textfield('url');
print $cgi->br;
print $cgi->submit( -label => 'Fetch' );
print $cgi->end_form;
print $cgi->end_html;
#### subroutines
sub fetch {
my ($url) = @_;
my $cont;

$cont = get($url);
return $cont;
   # copies text to file

sub cp_to_file {
my ($text, $to_file) = @_;

open(OUT, ">" . $to_file);
print OUT $text;

# copies file at HTML to a file

sub cp_to_file_html {
my ($text, $to_file) = @_;

open(OUT, ">" . $to_file);
print OUT $text;
return $text;
   # converts html text into plain text; (simplistic approach)

sub plain_text {
my ($in_text) = @_;
my $plain;

($plain = $in_text) =~ s/<[^>]*>//gs;

return $plain;

Ahhh, OK!

1. Remove the <form>-tag from your "frames.html" file.

2. The form-tag in your file "url_fetch.html" should be substituted with this one:

<form name="f1" ACTION="url_fetch.cgi" method="GET" target="results">

sdesarAuthor Commented:
I impelemeted your suggestion, but its still not working.  The output still appears on the Left side
when I enter the URL.

Featured Post

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now