B Wooster wrote:
> I've seen people use Javascript (changing text on a page), using
> redirects, etc to handle the case where a "please wait" screen has to
> be shown on a submit.
> 
> Are there best practices on doing this with CGI::Application?
> 
> Here's the problem:
> 1) mode1 - displays a form with submit.
> 2) mode2 - after user hits submit, would like to display the page with
> infomation trickling to the page - "done step 1, ... done step2 ..."
> Once the job is complete, would like to display "mode3" - the results page.
> 
> I've seen an archived message in this list - using "headers - none",
> and  then print data that will now directly go to the client browser
> page.

You can use this to not only print out additional HTML, but also print
out Javascript to update the contents.

> Others have suggested using Javascript to put up a generic
> "working..." sign in a <div> section on the page.
> 
> I am looking for any other ideas or thoughts.

Well, it's kind of hard to give you more ideas unless we know why you
don't like those other 2 and exactly why they won't give you what you're
after. Having said that...

You could wrap the form in a <div> and them make the form submission
using AJAX. Then using some callback hook on the server that will
retrieve status messages which you can display in the same <div> where
the form was contained. When done you can either redirect to the mode3
page or simply retrieve it via another AJAX call and stuff it into that
same <div>.

-- 
Michael Peters
Developer
Plus Three, LP


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to