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

Discussion in 'Perl Misc' started by lnorav@gmail.com, Sep 14, 2008.

  1. Guest

    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:
     
    , Sep 14, 2008
    #1
    1. Advertising

  2. Bill H Guest

    On Sep 14, 7:25 am, 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
     
    Bill H, Sep 14, 2008
    #2
    1. Advertising

  3. J. Gleixner Guest

    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:
     
    J. Gleixner, Sep 15, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Søren M. Olesen
    Replies:
    0
    Views:
    592
    Søren M. Olesen
    Nov 13, 2003
  2. jason
    Replies:
    1
    Views:
    1,325
    Damien
    Sep 5, 2005
  3. Zalek Bloom
    Replies:
    1
    Views:
    223
    Aaron Bertrand - MVP
    Sep 23, 2003
  4. Stefan Mueller
    Replies:
    2
    Views:
    84
    Stefan Mueller
    Nov 8, 2005
  5. lev
    Replies:
    1
    Views:
    134
    Thomas 'PointedEars' Lahn
    Sep 10, 2008
Loading...

Share This Page