How do I display a "please wait" message while processing a form?

I'm using CFMX 7 and processing a form that waits for a CC authorization. Sometimes it is very quick, but other times it takes a few seconds.

I'd like to display a "please wait..." or a count-down timer till the authorization is received to display to the user.

Anyone know of a script that does this? <cfflush>?
djbrannanAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mrichmonCommented:
There is no actual way as far as I know for a count-down.

The best you can do is something like the please wait or a "processing" message.  You display it first then you have it removed via javascript when the processing is complete.

So your form needs to submit to a page that doesn't do the CC.  Then it shows the message while a background job does the CC processing.  The background job then does a javascript redirect once procesing is complete.
pinaldaveCommented:
Hi djbrannan,
Mrichmon's suggestion is correct besides that...
http://www.experts-exchange.com/Web/WebDevSoftware/ColdFusion/Q_21365593.html
describes the detailed answer of your question.

Regards,
---Pinal
ctdigitalCommented:
Hi djbrannan!

If you want to go into the detail that pinaldave mentioned then that's great -  However, I usually use a very basic approach. (Literally extremely basic)  After the customer submits the credit card form at the top of the verification page just plop a blob of text that says "Processing Please Wait..." (No tags... just basic text)  It is very basic but it does the trick, and I have provided an example below!

 
<cfif loginUser.recordCount>
Logging In...
      <cfcookie name="LoggedIn" value="#loginUser.name#" expires="never">
      <cfheader name="Refresh" value="0; URL=#Go_To_Page#">
</cfif>

If you notice, I have the "Logging In..." text just floating there not attached to any functionality.
Hope this helps!

-ctdigital

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
djbrannanAuthor Commented:
Simple works for me.

Often times we tend to over think things, but this worked very well.

Thank you.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Servers

From novice to tech pro — start learning today.