Reputation: 16597
jQuery submit relies on the form having an id. With a struts html:form
you cannot define the id, only a name.
$('form[name="uploadForm"]').submit(function() {
alert("submitting");
// $('form[name="uploadForm"]').ajaxSubmit();
return false;
});
I've tried this, but the alert never shows up. Any ideas? The eventuality is to use the ajaxSubmit
for a true AJAX form submit. But I'm just testing at the moment.
Upvotes: 1
Views: 1416
Reputation: 6620
Try:
$('form[name=uploadForm]').submit(function() {
alert("submitting");
// $('form[name=uploadForm]').ajaxSubmit();
return false;
});
Upvotes: 1