views:

64

answers:

3

Using the uploadprogress plugin to show the Progress Bar during file upload and try to submit the form from success function. But it doesn't work. Here is the url of the uploadprogress:

http://nixboxdesigns.com/demos/jquery-uploadprogress.php

jQuery('#review_form').uploadProgress({ 
  progressURL:'jquery-uploadprogress-demo-simple.php',
  displayFields : ['kb_uploaded','kb_average','est_sec'],
  start: function() { 
   jQuery('#upload-message').html('Uploading files now - please wait.'); 
   jQuery('input[type=submit]',this).val('Uploading... PLEASE WAIT');
  },
  success: function() { 

//$(this).unbind('submit').submit();                            
//$('#review_form').unbind('click');
//$('#review_form').unbind('submit');
// $('#review_form').submit();
// $('#review_form').trigger('submit');
jQuery(this).submit();
  }
A: 

Why not jQuery(this).submit()?

VoteyDisciple
I checked but it doesn't work.
dremay
A: 

from your code i see you are trying to submit another form - review_form
Not familiar with this plugin, but looked at his examples and this should work:
$('#review_form').submit();

verify that review_form is a valid form (has an action) with id="review_form"

Avi Pinto
Thank you Avi. I have changed that form id and corrected. Actually, it was a mistake when I pasted in the Forum. On my testing page, both form ids are correct. Sorry for the mistake.
dremay
happy to help, and as a side note - you have a 0% accept rate - which means - you don't accept answers at the questions you ask. eventually people will stop answering your questions..
Avi Pinto
I didn't get answers .. But hereafter, I will respond to all answers. For this post, I have replied to all responses. But none of the responses helps me to fix the issue. But it worth.. Is there any way to partially accept the responses?
dremay
not that i know of
Avi Pinto
A: 

The Progress Bar working is something different of what I expected. The package submitted the form to the location specified in the "form" action attribute. The "file" and other form elements are available there.

I have changed my code to do the actual working there and redirect the page from the calling page. Thus my question to submit the form again is not needed. check one complete example about this:

http://www.ultramegatech.com/blog/2010/10/create-an-upload-progress-bar-with-php-and-jquery/

Thank you for all members who helped me to resolve the issue. And especially "Avi Pinto" for reminding about the necessity of my responses.

dremay