Alex has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks

Given the following scenario:
One html page which has a form. Hidden from the user is an embedded inline frame.

Now I was wondering that when the user clicks on the submit button, if it was possible for perl to output html to the hidden inline frame, instead of it being outputed to the 'main' html page.

Thank you for your time!
Alex

Replies are listed 'Best First'.
Re: Perl html redirect
by valdez (Monsignor) on Jun 23, 2003 at 19:29 UTC

    You can specify a TARGET inside your FORM or emit a target header from your cgi script; please refer to Working with frames in CGI.pm documentation.

    HTH, Valerio

Re: Perl html redirect
by Cody Pendant (Prior) on Jun 24, 2003 at 02:46 UTC
    You can do it, because as Valdez says, a FORM can have a TARGET -- but what's going to happen to the first frame, the one the user's expecting to change? Something better happen, possibly you'll have to do it with JavaScript, or else they'll be clicking all day.

    Also, why would you want to do this, and what will the user find when he or she spots what you're doing? What colour hat are you wearing?

    Finally, what could you possibly want to do with this frame that you couldn't do in some other way with Perl? If you want to log their activities, do it with the Perl script you're accessing by writing to a log.



    “Every bit of code is either naturally related to the problem at hand, or else it's an accidental side effect of the fact that you happened to solve the problem using a digital computer.”
    M-J D