Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6564205
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:56:15+00:00 2026-05-25T13:56:15+00:00

Looking at an example on image upload with JQuery here: http://www.zurb.com/playground/ajax_upload Using this example

  • 0

Looking at an example on image upload with JQuery here:
http://www.zurb.com/playground/ajax_upload

Using this example it is easy to create a simple image preview as you can see below.

The image preview works perfect. However, “input type=”file” id=”imageUpload”” does not keep the original file so when actually submitting/saving the whole form “form.imageUpload” is empty and not submitted with it.

I know I have already uploaded the image with AjaxUpload, but if you are just using this for preview reasons as in my example below, you still want to retain “the old fashioned way”. this script seems to remove the value from the input on form field “imageUpload” how can I get the script to maintain it so I can still upload the old way too.

Thanks

var thumb = $('img#thumb'); 

new AjaxUpload('imageUpload', {
    action: 'plugins/thumbnailupload.cfm',
    name: 'image',
    onSubmit: function(file, extension) {
        $('span.status').text("Loading preview");
    },
    onComplete: function(file, response) {
        thumb.load(function(){
            $('span.status').text("Loading");
            thumb.unbind();


            $.ajax({
                    type: "get",
                    url: "plugins/common/helpers/thumbCleanRam.cfm",
                    data: {
                    fileID: escape(response)
                },
            dataType: "json",
            });


        });
        response = $.trim(response)
        thumb.attr('src', 'plugins/common/helpers/thumbnailpreview.cfm?f='+escape(response));
    }
});

});

 <div class="clearfix">
      <label for="icon">Upload Image</label>
      <div id="preview"><span id="status"></span><img id="thumb"></div>
      <div class="input">
        <input type="file" id="imageUpload" name="imageUpload">
        <br/>
      </div>
    </div>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T13:56:15+00:00Added an answer on May 25, 2026 at 1:56 pm

    It appears that it is not possible as the script takes of the upload so reloading on submit is not possible unless I copy the field again.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

looking at this example of the jquery ui slider http://jqueryui.com/demos/slider/#steps i want to be
I'm looking for an example of how to load an image from file and
I am looking for a cocoa example that illustrates how to drag an image
Looking for an example of storing session data in a database, using the Zend
I'm looking to center crop and image using Imagick PHP apis (not command line
I'm looking for a very example file upload code snipplet/solution in Silverlight. Having done
I'm looking for a horizontal jquery image scroller that I can used to display
My example here, Shows an image in the center of CSS3 generated columns. I
Here's what I'm looking to do: I have an image, let's say of a
I am using the Jquery Form plugging to try and upload a picture to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.