Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Relaying form data

by Wassercrats
on May 11, 2002 at 03:32 UTC ( #165839=perlquestion: print w/replies, xml ) Need Help??
Wassercrats has asked for the wisdom of the Perl Monks concerning the following question:

I have a search engine form on my homepage with a form action tag pointing to someone elses site. Is there a way to create a frame or open a window when the form is submitted so my page won't be entirely removed by the search results? The only solution I figured out was to point the form to a script on my site where I'd put the submitted data in hidden fields, load my homepage from the script, open the window, and offer some choice to get another submit button to be pressed.

Replies are listed 'Best First'.
Re: Relaying form data
by Kanji (Parson) on May 11, 2002 at 03:55 UTC

    If you don't have control of the script in the action tag, this really isn't a Perl problem unless you intend on writing a proxy/scraper (ie, a CGI that goes and queries the remote form, parses the results, and displays them to your visitors).

    Instead you should be looking to HTML (particularly <form>'s target attribute) or JavaScript.


      I just read about the target attribute. It sounds like the simple way to use it would require submitting the form from a page already containing a frameset. I want a frame to appear only when the form is submitted.

      Now that I think of it, I do have content in the center of my page that I can put in a seperate frame which could be the target, but scrolling would be necessary when once the form is submitted and a scrollbar in the center of the page would look horrible when my regular page content is displayed.

      My original idea still seems necessary. I'd have the scroll bar only when the form is submitted, and a link back to my frameless homepage. If I do it this way, I'd coax people to press an extra submit button after a message stating that the following content is from another website, I'm not responsible... blah blah blah... click the link to return... blah blah... and click here (submit) to continue.

        Since you can't seem to rtfm :)
        <form .... target="_blank">
        cLive ;-)


Re: Relaying form data
by cLive ;-) (Prior) on May 11, 2002 at 12:08 UTC
    "Is there a way to create a frame or open a window when the form is submitted so my page won't be entirely removed by the search results?"

    Yes - the target attribute of the form tag.

    cLive ;-)


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://165839]
Approved by BigGuy
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2018-01-24 02:13 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (255 votes). Check out past polls.