CGI: redirect some value to the previous URL

Discussion in 'Perl Misc' started by Wenjie, Oct 4, 2003.

  1. Wenjie

    Wenjie Guest

    Hello,


    I add an upload file feature to a BBS using perl. The
    difficult thing is how I manage to integrate the upload
    and message posting: the BBS is written using CGI.pm but
    the posting code block is mainly HTML and javascripts
    with perl variables, so my standalone upload.pl won't
    work. Now I provided the URL of upload.pl for the user
    to use the uploading function. But the user have to
    copy and paste the uploaded file name and 'back' to
    previous page. My question is: could I use some trick
    to redirect the upload.pl result to the previous page
    automatically?


    Thanks and best regards,
    Wenjie
    Wenjie, Oct 4, 2003
    #1
    1. Advertising

  2. Wenjie

    Mina Naguib Guest

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Wenjie wrote:
    > Hello,
    >
    >
    > I add an upload file feature to a BBS using perl. The
    > difficult thing is how I manage to integrate the upload
    > and message posting: the BBS is written using CGI.pm but
    > the posting code block is mainly HTML and javascripts
    > with perl variables, so my standalone upload.pl won't
    > work. Now I provided the URL of upload.pl for the user
    > to use the uploading function. But the user have to
    > copy and paste the uploaded file name and 'back' to
    > previous page. My question is: could I use some trick
    > to redirect the upload.pl result to the previous page
    > automatically


    It's the same technique that any normal CGI uses to re-direct really. It's irrelevant that
    upload.pl is receiving file contents and saving it into a file vs. normally receiving key=value
    pairs and parsing them in memory.

    You can output an HTTP "Location:" re-direct tag, or output text/html containing meta-refresh or
    javascript re-direct code.












    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.1 (GNU/Linux)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

    iD8DBQE/f0y1eS99pGMif6wRApJ6AJ4x1LaUSV5xD+sbDzPKwP4aeTt1PwCg/ptU
    O/rq9IudFEfwIDvnPAVTwC4=
    =R7FF
    -----END PGP SIGNATURE-----
    Mina Naguib, Oct 4, 2003
    #2
    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. Jon paugh
    Replies:
    1
    Views:
    680
  2. Sal
    Replies:
    1
    Views:
    374
  3. Professor Chen
    Replies:
    0
    Views:
    141
    Professor Chen
    Feb 6, 2006
  4. - Bob -

    CGI URL Redirect

    - Bob -, Mar 22, 2007, in forum: Perl Misc
    Replies:
    1
    Views:
    71
  5. Penny

    Redirect to 'another' previous page

    Penny, May 26, 2005, in forum: Javascript
    Replies:
    6
    Views:
    100
    Penny
    May 27, 2005
Loading...

Share This Page