Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

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.

Comment on Relaying form data
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.

        --k.


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

        --
        seek(JOB,$$LA,0);

Re: Relaying form data
by cLive ;-) (Parson) 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 ;-)

    --
    seek(JOB,$$LA,0);

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://165839]
Approved by BigGuy
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (10)
As of 2014-07-28 08:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (193 votes), past polls