3 Replies Latest reply on Sep 8, 2009 8:41 AM by Dan Bracuk

    Please Wait Script

    ACS LLC Level 1

      I have a payment script which processes credit cards through PayPal, they say that it can take as long as 30 seconds to process the payment, which leaves the end user hanging.


      I need a script that displays a 'Please Wait - Your order is being processed" in the middle of the screen.


      Would anybody happen to have anything off the shelf that I could use? If it uses any server side code, it must run on a CF7 server





        • 1. Re: Please Wait Script
          Dan Bracuk Level 5

          The simplest ways are to use Cold Fusion.


          Method 1 - Intermediate page.  The intermediate page collects the user input, usually from a form.  It converts those variables to session variables displays something, and cflocates to the next page.


          Method 2 - cfflush.


          Method 1 probably meets your requirements more than method 2.


          You can also do it with javascript, but using cf is more reliable.

          • 2. Re: Please Wait Script
            ACS LLC Level 1

            Thanks for the reply Dan, I was just about to post myself to say that I had found a solution, a simple little script that works real well. The only thing I can't seem to do with it is add more than one line of text without it leaving a huge gap between the two lines, but that's not the end of the world.


            This script puts a please waiting on top of the existing submit page and it does not disappear until the next page is ready to be displayed, which also helps by not allowing them access to the submit button


            Here's the code, I'm sure somebody else will also find this valuable:


            <script type="text/javascript">
            var ray={
                    return document.getElementById(el);


            <style type="text/css">
            border:13px double #000000;
            font-family:"Trebuchet MS", verdana, arial,tahoma;


            <div id="load" style="display:none;">Processing... Please wait. May take up to 30 seconds</div>


            You then just have to make sure you have ONSUBMIT in the form

            <form action="YOUR NEXT PAGE.cfm" method="post" onsubmit="return ray.ajax()">

            • 3. Re: Please Wait Script
              Dan Bracuk Level 5

              We do something similar but it is not 100% reliable.  Where it falls down is if the user navigates to another window or tab and then comes back.  The display is gone and it's possible to re-submit the request.