Jump to content
  • Advertisement
Sign in to follow this  
31337

[web] CGI Wait Screen?

This topic is 5397 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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/javascript to display the wait message and disable the form.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!