Click here to get back home

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

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
transfer value from one page to single frame of a second,frameset page lnorav 09-14-2008
Get Chitika Premium
Posted by lnorav on September 14, 2008, 7:25 am
Please log in for more thread options


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 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:

Posted by Bill H on September 14, 2008, 7:44 am
Please log in for more thread options


On Sep 14, 7:25=A0am, 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 =3D result file.cgi' in the 'sign-in' file and
> $ENV in the result file.cgi, but then only the
> result frame alone was displayed. Doing the same with 'action=3D
> frameset file.htm' displays all frames, but no value is transferred to
> the static html file. =A0This is why I need to write the frameset as a
> cgi file. =A0A value transferred to a frameset.cgi file could, I assume,
> be used as a global value by the single result frame.
> =A0My 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 =A0-w
>
> =A0use CGI qw/:standard/;
> =A0my $q=3Dnew CGI;
> =A0use CGI::Carp qw(fatalsToBrowser);
>
> =A0print $q->header(); =A0 =A0 =A0 =A0#or: $q->print("Content-Type: text/=
html\n
> \n");
> =A0print $q->start_html(-title=3D>'PagePass');
>
> =A0print <<endhtml;
> =A0 =A0 =A0 =A0<FRAMESET ROWS=3D"50%,*">
> =A0 =A0 =A0 =A0 =A0 <FRAME NAME=3D"frameA" SRC=3D"http://bioinfo.weizmann=
.ac.il/
> safety-bin/x.cgi">
> =A0 =A0 =A0 =A0 =A0 <FRAME NAME=3D"frameB" SRC=3D"http://bioinfo.weizmann=
.ac.il/
> safety-bin/cgi-bin/y.cgi">
> =A0 =A0 =A0 =A0</FRAMESET>
> =A0endhtml
> =A0;
> =A0# =A0 =A0 =A0exit 0;
>
> =A0#malformed header from script. Bad header=3D<!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=3Dresult file.cgi in frameA and
want the results to show up in frameB, add target=3DframeB in the form
element tag

Bill H

Posted by J. Gleixner on September 15, 2008, 1:13 pm
Please log in for more thread options


lnorav@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 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:

Similar ThreadsPosted
LWP user agent grabs the intermediate wait page after POST intead of the actual result page February 12, 2008, 12:50 am
How to get the DOM from a XML page November 27, 2006, 6:54 am
How to automatically log in a web page? October 8, 2004, 8:53 am
How do I parse this page? October 26, 2004, 2:25 pm
Page can not be displayed... December 17, 2004, 11:18 pm
Page can not be displayed... December 18, 2004, 4:26 am
Page can not be displayed... December 19, 2004, 12:13 pm
Page can not be displayed... December 19, 2004, 1:02 pm
Page can not be displayed... December 19, 2004, 10:12 pm
FAQ 9.11 How do I redirect to another page? March 20, 2005, 12:03 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap