Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: CGI - Keep'em quiet page?

by nysus (Parson)
on Jun 16, 2001 at 19:11 UTC ( [id://89056]=note: print w/replies, xml ) Need Help??


in reply to CGI - Keep'em quiet page?

First if you are looking for a real Perl soultion you'll want to check out merlyn's article here.

I had a similar desire to accomplish the same thing as you a few months ago but not a Perl guru, I did the following bit of trickery:

When the form gets submitted, you get redirected to a two-framed page. The top frame has a width of 0 so it won't be seen by the user. The top frame is also an .shtml page and contains a server side include to the script that will process the form. The bottom frame will contains the "Please Wait" message. So while your top frame is doing it's work, the bottom frame will display the message.

Now here's the real trick: you have your Perl code generate a bit of javascript at the very end of the Perl code (the one called by the top frame) that will redirect the browser to your desired page and replace the two-framed layout with a one framed layout. In case the user doesn't have javascript, you also have the Perl script generate <noscript> tags and have them click a link to take them to the page you want them to get to.

So now, when the Perl is done doing it's stuff, it will generate some js code an put it into the top frame, and then user will get automatically redirected (with js enabled) or they will be requested to click a link to continue on.

$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot";
$nysus = $PM . $MCF;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://89056]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2024-03-28 16:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found