jquery form plugin

I dont understand how does jquery form plugin is different than html form ?

here is the jquery form plugin
http://malsup.github.com/jquery.form.js

Please comment.
cofactorAsked:
Who is Participating?
 
Rainer JeschorCommented:
Hi,
this should not be pulled from the server but from the client through the XMLHttpRequest  object.
From the example page:
Browsers that support the XMLHttpRequest Level 2 will be able to upload files seamlessly and even get progress updates as the upload proceeds.
And the plugins ajaxForm function has the callback option/function uploadProgress which is then called passing the current progress values, when you can then control how this info is visualized on the page.

HTH
Rainer
0
 
Rainer JeschorCommented:
Hi,
as you can see on the examples page(s)
http://malsup.com/jquery/form/#tab4
the plugin offers some nice add-ons when it comes to asynchronous form posts and return callbacks as well as handling JSON responses.
Of course, you could also code everything in standard HTML and JavaScript or use the jQuery possibilities - but it is more manual coding work :-)
HTH
Rainer
0
 
cofactorAuthor Commented:
I am still confused. I am looking at this code

Jquery  file upload

http://www.simplecodestuffs.com/file-upload-with-progress-bar-using-jquery-in-servlet/

In this example , jquery form plugin has been used.

I have a  doubts in this regard.......How does the file upload progress % is pulled from server ?

I see the code ..
uploadProgress : function(event, position, total, percentComplete) {
		$("#progressbar").width(percentComplete + '%');
		$("#percent").html(percentComplete + '%');

		// change message text and % to red after 50%
		if (percentComplete > 50) {
			$("#message").html("<font color='red'>File Upload is in progress .. </font>");
		}
	}

Open in new window



I don't understand how the file upload progress  percentComplete  is pulled from server . Is it dynamic ?  I am stuck at this part. Could you please explain this part.
0
 
cofactorAuthor Commented:
OK

But in this code ...

uploadProgress : function(event, position, total, percentComplete) {

Open in new window


who is providing value of percentComplete here ?  

also what is  position, total  here ?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.