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

  • SEARCH
  • Home
  • 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 8922341
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T06:48:29+00:00 2026-06-15T06:48:29+00:00

I’m having an issue in firing the uploader.start() in case if start button is

  • 0

I’m having an issue in firing the uploader.start() in case if start button is not clicked for file upload, I am using latest version Plupload. here is the complete code, and I want to find the temp names given for each file uploaded on submit click, so that I can go to the server and rename the files with the reference ID which makes easy to identify the file that belongs.

     <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
    <link href="Styles/jquery.plupload.queue.css" rel="stylesheet" type="text/css" />
    <script src="Script/jquery-1.8.2.js" type="text/javascript"></script>
    <script src="Script/FileUpload/plupload.full.js" type="text/javascript"></script>
    <script src="Script/FileUpload/jquery.plupload.queue.js" type="text/javascript"></script>
    <title>Test Page</title>
    <script type="text/javascript">
        $(document).ready(function () { 
          $("#Testloader").pluploadQueue({
              runtimes: 'flash',
              url: 'FileUpload.ashx',
              max_file_size: '100mb',
              urlstream_upload: true,
              chunk_size: '5MB',
              //unique_names: false,
              multiple_queues: true,

              filters: [
            { title: "Document files", extensions: "pdf,doc,docx,tiff" },
            { title: "Image files", extensions: "jpg,png" }
        ],
              // Flash settings
              flash_swf_url: 'Images/plupload.flash.swf',

              //                    // Silverlight settings
              //                    silverlight_xap_url: 'assets/resources/plupload.silverlight.xap',

              init: {
                  FileUploaded: function (up, file, info) {
                  },                 
                  FilesRemoved: function (up, files) {
                      plupload.each(files, function (file) {

                      });
                  }
              }

          });
      });
      $('form').submit(function (e) {
          alert("clicked me");
          var uploader = $("#Testloader").pluploadQueue();
          // Files in queue upload them first
          if (uploader.files.length > 0) {
              // When all files are uploaded submit form
              uploader.bind('StateChanged', function () {
                  if (uploader.files.length === (uploader.total.uploaded + uploader.total.failed)) {
                      // $('form')[0].submit();
                      alert("Form submitted");
                  }
              });
              uploader.start();

          } else {

              alert('You must queue at least one file.');

          }
          return false;
      });
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div id="Testloader">      
    </div>
   <input type="submit" value="send" />
    </form>
</body>
</html>
  • 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-06-15T06:48:31+00:00Added an answer on June 15, 2026 at 6:48 am

    First, you should move the submit binding inside the $(document).ready to ensure the DOM is ready for submit binding.

    I guess you should try relying on a closure to ensure “uploader” is correctly bound during StateChanged (you could also begin your StateChanged Handler with var uploader = $(“#Testloader”).pluploadQueue();) :

      $('form').submit(function (e) {
          alert("clicked me");
          var uploader = $("#Testloader").pluploadQueue();
          // Files in queue upload them first
          if (uploader.files.length > 0) {
              // When all files are uploaded submit form
              uploader.bind('StateChanged', (function(closedUploader){return function () {
                  if (closedUploader.files.length === (closedUploader.total.uploaded + closedUploader.total.failed)) {
                      // $('form')[0].submit();
                      alert("Form submitted");
                  }
              };})(uploader)
              );
              uploader.start();
    
          } else {
    
              alert('You must queue at least one file.');
    
          }
          return false;
      });
    

    Hope this will help

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
We're building an app, our first using Rails 3, and we're having to build
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I am using Paperclip to handle profile photo uploads in my app. They upload
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I am reading a book about Javascript and jQuery and using one of the
Specifically, suppose I start with the string string =hello \'i am \' me And

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.