[web] CGI Wait Screen?

Started by
14 comments, last by 31337 19 years, 6 months ago
I wrote a CGI web service in C++ and I want to add in some sort of intermediate waiting page. How do I do this? I'm sort of stuck, this is an esoteric topic. Thanks in advance.
OpenGL Revolutions http://students.hightechhigh.org/~jjensen/
Advertisement
explain slightly more about whaqt you want to do.
You could probably either a) send a mete-refresh with a certain wait time out, or b) have an html file that has the meta-refresh
i'm sure he knows about refresh, and since its an cgi page, he can just send an http one, rather than a meta one.

The devil is in the details, do you want to wait a few seconds? or wait until some complicated transaction completes?
I was thinking of something where they click submit and then a new page pops up that says their request is being processed. It could take anywhere from 20 seconds to a day and so I think I might put in time estimates, but that would be preferable. What is a meta refresh? Thanks
OpenGL Revolutions http://students.hightechhigh.org/~jjensen/
Will the application finish writing the output before the submitted data has been processed? If so, output the intermediate page and set a refresh for 5-10 seconds (or however long you need) and keep outputting that page until the script detects that the submitted data has been processed. Otherwise, use DHTML/&#106avascript to display the wait message and disable the form.
Free Mac Mini (I know, I'm a tool)
Currently my program doesn't output anything until after the data has been processed. How does refreshing work? How does that interface with my C++ program? Thanks
OpenGL Revolutions http://students.hightechhigh.org/~jjensen/
Check out here for a little info on either the http refresh or meta refresh: scroll down to client pull
http://wp.netscape.com/assist/net_sites/pushpull.html

You can also google for more info.

As far as how it integrates into you c++ cgi program, no differently then how you send any http headers or html text. You send it down the stream.
Alright, this is enough to make me bash my head through a wall. I read that document (and many others) and I can't figure out why my program doesn't work. The problem is that instead of processing the data as multipart/mixed it is outputting at the top of my data:

--PageBorder
Content-Type: text/html

At the start I output:

Content-type: multipart/x-mixed-replace;boundary=PageBorder\n\n

Then:

--pageBorder\nContent-Type: text/html\n\n

Followed by my HTML data and ended by:

\n--PageBorder--\n

Now what on earth is wrong? Why is it sticking my pageborder into the output page? I am really stuck and getting frustrated. Thank you.
OpenGL Revolutions http://students.hightechhigh.org/~jjensen/
I've never seen that sort of thing used by HTTP before. I don't think it's a good idea to rely on it. Client pull is probably the way to go.

This topic is closed to new replies.

Advertisement