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