Appnitro Software Forums » MachForm

Upload progress ...

(29 posts)

  1. Compu
    Member

    MachForm,

    I was wondering if it was possible to get any type of progress indicator for the file uploads. If a progress indicator isn't possible, how about just simply disabling the continue button and displaying an animated gif for the client to get a visual that their file is being uploaded.

    We deal with a lot of .pdf files and they are rather large and take a good deal of time to upload.

    Thanks!
    Jonathan

    Posted 2 years ago #
  2. Hello Jonathan,

    Actually, yes it is possible to disable the continue/submit button and display an animated gif.

    Edit your includes/view-functions.php file, search around line 1830 and you should find these lines:

    <link rel="stylesheet" type="text/css" href="{$css_dir}view.css" media="all" />
    <script type="text/javascript" src="js/view.js"></script>
    {$calendar_js}

    Right below those lines, insert this block of code:

    <script type="text/javascript" src="js/jquery/jquery-core.js"></script>
    <script>
    $(document).ready(function(){
    	var upload_prop   = $("form").attr("enctype");
    	var show_progress = false;
    	if(upload_prop == 'multipart/form-data'){
    		show_progress = true;
    		$("form").submit(function(){
    		$("#saveForm").val("Uploading... Please wait...");
    		$("#saveForm").attr("disabled","disabled");
    		$("#li_buttons").append("<img src=\"images/loader-red.gif\" />");
    		});
    	}
    });
    </script>

    That would display an animated gif when your files being uploaded.

    Posted 2 years ago #
  3. A nice script that would accomplish this nicely is:

    SWFUpload (http://www.swfupload.org/ or http://swfupload.googlecode.com/)

    Demos (or applications of it) can be found here: http://demo.swfupload.org/

    I bet Yuniar could incorporate this (or something similar) into MachForm no problem :)

    Posted 1 year ago #
  4. Thanks for the link! Their demo looks awesome

    Posted 1 year ago #
  5. After adding the above suggested code, my forms now all have the line:

    Warning: Cannot modify header information - headers already sent by (output started at [my site]/machform/includes/view-functions.php:1) in [my site]/machform/view.php on line 89

    Can you please advise as to how I fix this?

    Thanks.

    Posted 1 year ago #
  6. What editor did you use to modify the file?

    That seems to be text editor problem. There is an extra character (non-visible character) being added at the beginning of your "view-functions.php" file.

    Try to restore that file with the original and then redo the modification using another text editor.

    I suggest to use Notepad++:
    http://notepad-plus.sourceforge.net

    Posted 1 year ago #
  7. This works fine - but doesn't display the animated .gif during the upload? It does disable the button and say "Uploading...Please wait..." but no .gif displayed?

    Posted 1 year ago #
  8. That's odd. Can you paste me the URL to your form? I'll try it.

    Posted 1 year ago #
  9. I am having issues getting this to work as well. The form is still functioning fine, but I am noth seeing the "uploading" message nor the animated gif.

    -jason

    Posted 1 year ago #
  10. Jason, I just checked your form. I see the animated gif and "uploading" worked fine there?

    See it at the bottom, near your form submit button.

    Posted 1 year ago #
  11. christpage
    Member

    This works fine - but doesn't display the animated .gif during the upload? It does disable the button and say "Uploading...Please wait..." but no .gif displayed?

    Posted 1 year ago #
  12. Hi,

    Could you tell me your form url ? I need to test it .

    Posted 1 year ago #
  13. christpage
    Member

    Hi reityo, form url is www.bighill.biz/ddn.htm

    Posted 1 year ago #
  14. christpage -- I just tested your form.
    When I submit the form, I can see the animated loader image next to your form submit button.

    Perhaps try refresh your browser?

    Posted 1 year ago #
  15. drumaboy46
    Member

    Ok I tried this but it only works in safari on the mac and doesn't work in these browsers

    IE7 or 8
    Firefox

    and by only works I mean you see the "please wait" AND loading gif. In all browsers I see loading please wait but not the gif!

    Posted 2 months ago #
  16. Try using the full image path to loading.gif

    Change this line:

    $("#li_buttons").append("<img src=\"images/loader-red.gif\" />");

    put the full path to loader-red.gif there, example:

    $("#li_buttons").append("<img src=\"http://www.example.com/images/loader-red.gif\" />");
    Posted 2 months ago #
  17. drumaboy46
    Member

    still only shows up in Safari. In firefox I only get the message please wait and no gif. BUT in Internet explorer the gif now appears :). I want it to work for Firefox since more people use IE and Firefox I'm sure it has something to do with the java-script maybe 2 down one to go. :)

    Posted 2 months ago #
  18. Hmm.. can you post the URL of your form? I'll check it.
    Or if you don't want to post it here, please mail us directly.

    Posted 2 months ago #
  19. drumaboy46
    Member

    cdintl.net/machform/view.php?id=11 just click the continue button the loader gif and message should show up with out you logging in thanks.

    Posted 2 months ago #
  20. I've tested using Firefox 3.6.3 and able to see the loader gif just fine.
    Perhaps try again and delete your browser cache first?

    Posted 2 months ago #

RSS feed for this topic

Reply »

You must log in to post.