Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > transfer value from one page to single frame of a second,framesetpage

Reply
Thread Tools

transfer value from one page to single frame of a second,framesetpage

 
 
lnorav@gmail.com
Guest
Posts: n/a
 
      09-14-2008
I want to pass a value(name) from a 'sign-in'(password) page to
one(result) frame of a second, three-frame frameset page. I did this
with 'action = result file.cgi' in the 'sign-in' file and
$ENV{'REQUEST_METHOD'} in the result file.cgi, but then only the
result frame alone was displayed. Doing the same with 'action=
frameset file.htm' displays all frames, but no value is transferred to
the static html file. This is why I need to write the frameset as a
cgi file. A value transferred to a frameset.cgi file could, I assume,
be used as a global value by the single result frame.
My efforts to write such a frameset, as the example below, were not
successful. Perhaps, someone could steer me right via cgi or via a
better(js) approach?

#!/usr/bin/perl -w

use CGI qw/:standard/;
my $q=new CGI;
use CGI::Carp qw(fatalsToBrowser);

print $q->header(); #or: $q->print("Content-Type: text/html\n
\n");
print $q->start_html(-title=>'PagePass');

print <<endhtml;
<FRAMESET ROWS="50%,*">
<FRAME NAME="frameA" SRC="http://bioinfo.weizmann.ac.il/
safety-bin/x.cgi">
<FRAME NAME="frameB" SRC="http://bioinfo.weizmann.ac.il/
safety-bin/cgi-bin/y.cgi">
</FRAMESET>
endhtml
;
# exit 0;

#malformed header from script. Bad header=<!DOCTYPE html:
 
Reply With Quote
 
 
 
 
Bill H
Guest
Posts: n/a
 
      09-14-2008
On Sep 14, 7:25*am, lno...@gmail.com wrote:
> I want to pass a value(name) from a 'sign-in'(password) page to
> one(result) frame of a second, three-frame frameset page. I did this
> with 'action = result file.cgi' in the 'sign-in' file and
> $ENV{'REQUEST_METHOD'} in the result file.cgi, but then only the
> result frame alone was displayed. Doing the same with 'action=
> frameset file.htm' displays all frames, but no value is transferred to
> the static html file. *This is why I need to write the frameset as a
> cgi file. *A value transferred to a frameset.cgi file could, I assume,
> be used as a global value by the single result frame.
> *My efforts to write such a frameset, as the example below, were not
> successful. Perhaps, someone could steer me right via cgi or via a
> better(js) approach?
>
> #!/usr/bin/perl *-w
>
> *use CGI qw/:standard/;
> *my $q=new CGI;
> *use CGI::Carp qw(fatalsToBrowser);
>
> *print $q->header(); * * * *#or: $q->print("Content-Type: text/html\n
> \n");
> *print $q->start_html(-title=>'PagePass');
>
> *print <<endhtml;
> * * * *<FRAMESET ROWS="50%,*">
> * * * * * <FRAME NAME="frameA" SRC="http://bioinfo.weizmann..ac.il/
> safety-bin/x.cgi">
> * * * * * <FRAME NAME="frameB" SRC="http://bioinfo.weizmann..ac.il/
> safety-bin/cgi-bin/y.cgi">
> * * * *</FRAMESET>
> *endhtml
> *;
> *# * * *exit 0;
>
> *#malformed header from script. Bad header=<!DOCTYPE html:


Not really perl, but you need to put a target in your form tag. For
example if you have the form with action=result file.cgi in frameA and
want the results to show up in frameB, add target=frameB in the form
element tag

Bill H
 
Reply With Quote
 
 
 
 
J. Gleixner
Guest
Posts: n/a
 
      09-15-2008
wrote:
> I want to pass a value(name) from a 'sign-in'(password) page to
> one(result) frame of a second, three-frame frameset page. I did this
> with 'action = result file.cgi' in the 'sign-in' file and
> $ENV{'REQUEST_METHOD'} in the result file.cgi, but then only the
> result frame alone was displayed. Doing the same with 'action=
> frameset file.htm' displays all frames, but no value is transferred to
> the static html file. This is why I need to write the frameset as a
> cgi file. A value transferred to a frameset.cgi file could, I assume,
> be used as a global value by the single result frame.
> My efforts to write such a frameset, as the example below, were not
> successful. Perhaps, someone could steer me right via cgi or via a
> better(js) approach?
>
> #!/usr/bin/perl -w
>
> use CGI qw/:standard/;
> my $q=new CGI;


FYI: When using :standard you don't need to explicitly instantiate a
CGI object, the methods are imported for you. e.g.

use CGI qw(:standard);
print header, start_html, h1('testing'), end_html;


> use CGI::Carp qw(fatalsToBrowser);
>
> print $q->header(); #or: $q->print("Content-Type: text/html\n
> \n");
> print $q->start_html(-title=>'PagePass');

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Remove/Comment out this line. Read up on HTML frames.

>
> print <<endhtml;
> <FRAMESET ROWS="50%,*">
> <FRAME NAME="frameA" SRC="http://bioinfo.weizmann.ac.il/
> safety-bin/x.cgi">


note: missing cgi-bin there?

> <FRAME NAME="frameB" SRC="http://bioinfo.weizmann.ac.il/
> safety-bin/cgi-bin/y.cgi">
> </FRAMESET>
> endhtml
> ;
> # exit 0;
>
> #malformed header from script. Bad header=<!DOCTYPE html:

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
value transfer from page to frame in second page frameset lev Javascript 1 09-10-2008 04:39 PM
Server.Transfer - frame to non frame jason ASP .Net 1 09-05-2005 07:34 AM
Manipulating control in one frame from another frame, how? Søren M. Olesen ASP .Net 0 11-13-2003 05:37 PM
how to redirect from 3 frame page to single page frame? Zalek Bloom ASP General 1 09-23-2003 02:23 PM
Passing value from one script on one page to another script on another page. Robert Cohen ASP General 3 07-15-2003 01:46 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57