13 Replies Latest reply on Feb 22, 2007 7:51 AM by insuractive


      Hi i have a file upload area for images, this also resizes the image and can take a few mins, is there a way of having some text
      saying PLEASE WAIT IMAGE IS UPLOADING on my action page, and once it has uploaded it redirects to a new url?
        • 1. Re: Loading
          In HTML, you create a layer and hide it, creating an onload tag within the body tag.

          This is in the Dreamweaver docs, and also can be found (I think) in some of the CF docs.

          Do a search on "layers" or "onload".

          - Mike
          • 2. Re: Loading
            MichaelSJudd Level 1
            Oops - forgot the second part of your question.

            As far as the re-direction, you can use "cflocation", and may or may not need the "addtoken" parameter, depending on whether it is an application, how the application stores variables, etc.

            - Mike
            • 3. Re: Loading
              JohnGree Level 1
              ok so once i have created a layer, how would i hide it, and what onload do i need?
              • 4. Re: Loading
                MichaelSJudd Level 1
                Well, I can walk you part og the way through it (it's getting late):

                In DW, Open the page in question, go into Code View, and put your cursor ing the body tag.

                In the Tag Inspector Panel, Add a behavior "Show Hide Layers".

                There is a very good example of how to do this in DW Help. (That's what I first used to contruct mine).

                Search for "onload", and Show-Hide Layers comes up in the search results, and explains the particulars.

                - Mike

                • 5. Re: Loading
                  JohnGree Level 1
                  ok thanks justa quick one show hide layers is greyed out?
                  • 6. Re: Loading
                    Dan Bracuk Level 5
                    The easier way is to use cfflush. Details are in the cfml reference manual. If you don't have one, the internet does.
                    • 7. Re: Loading
                      JohnGree Level 1
                      ok i have done that but i still get the first page where the file upload is, taking ages to process

                      this is what i have

                      **UPLOAD PAGE**
                      <table width="389" border="1" align="center" bordercolor="#FFFFFF">
                      <form action="SMS_ExcelUploading.cfm" method="post" enctype="multipart/form-data" name="form1">
                      <tr bordercolor="#BB2020" class="SmallBody">
                      <td width="213"><div align="right"></div>
                      <div align="left">
                      <input name="file" type="file" size="14">
                      <td width="160"><input name="submit2" type="submit" value="Upload Excel Sheet"></td>

                      • 8. Re: Loading
                        JohnGree Level 1
                        can i have a onclick show message "please wait " on the file submi button?
                        • 9. Re: Loading
                          MichaelSJudd Level 1
                          I have a graphic on my "onload=" page that has a little three dots after the Loading Please Wait... that increment, etc. Simple .gif, but I didn't make it (our graphics guys did).

                          The docs Dan was referring to are very good - there was even a tutorial on how to do this with cfflush on the Adbobe website, even though it was originally for CF 5, it probably still applies.

                          - Mike
                          • 10. Re: Loading
                            MichaelSJudd Level 1

                            Originally posted by: JohnGree
                            can i have a onclick show message "please wait " on the file submi button?

                            Sorry - forgot about this one.

                            You CAN do anything, it just usually requires Javascript.

                            - Mike
                            • 11. Loading
                              insuractive Level 3
                              Try adding the following code to your <form> tag:

                              OnSubmit="document.myFormName.MySubmitButtonName.value='Please Wait...'; document.myFormName.MySubmitButtonName.disabled=true;"

                              That should change the text on the submit button to "Please Wait" and disable it to prevent double posts.
                              Of course, you have to swap in your values for myFormName and MySubmitButtonName.
                              • 12. Re: Loading
                                JohnGree Level 1
                                Hi i have added this to my form tag, but i get a javascript error: document.Form1.submit2 is null or not an object

                                OnSubmit="document.Form1.submit2.value='Please Wait...'; document.Form1.submit2.disabled=true;"
                                • 13. Re: Loading
                                  insuractive Level 3
                                  Make sure you double check the case of your variables (remember JavaScript is case sensitive). If you are still having problems, post your <form> and <input type="submit"> tags and we'll take a look.