Panos
asked on
Jquery.form plugin submit onchange - problem
Hello experts.
I want to use jquery.form plugin.
The problem i have is that i need to fire the ajax - submit on file select but i can't.
Here is my code
I want to use jquery.form plugin.
The problem i have is that i need to fire the ajax - submit on file select but i can't.
Here is my code
$(document).ready(function () {
$("#instruc").on("change", ".filefield", function (e) {
e.preventDefault();
var myform = $(this).parent('form');
$(myform).ajaxForm({
dataType: 'json',
url: 'myactionpage.cfc',
beforeSubmit: validate,
beforeSend: function () {},
uploadProgress: function (event, position, total, percentComplete) {},
complete: function (response) {}
}, "json");
}
)
});
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
oo man its a big difference...
you should have specified...
you should have specified...
ASKER
I have the same code without the on change event ( it is working submiting the form with a button). It is working with ajaxForm. In this case it is not.
ASKER
None of the two is working. I changed
$(myform).ajaxForm({
to
$(myform).ajaxSubmit({
Now it is working. I don't know what the differences between ajaxForm and ajaxSubmit are