[jQuery] newbie ajaxForm/ajaxSubmit question
hi
i'm trying to submit an html form containing a file input. the form
looks like this:
<form id="uploadForm" action="upload" enctype="multipart/form-data"
method="post" >
<input type="file" id="uploadCandidate">
<input type="submit" value="Upload!" />
</form>
the problem seems to be that the form is always submitted as a GET
rather than a post, the server does receive the query. i used the
example from the jquery site (http://www.malsup.com/jquery/form/#code-
samples), which didn't work so i modified the type to ensure that it
used POST, and still no good. my javascript looks like this
// wait for the DOM to be loaded
$(document).ready(function() {
alert('preparing ajaxForm for ajaxSubmit');
// prepare Options Object
var options = {
type: 'post',
beforeSubmit: showRequest
};
// bind 'myForm' and provide a simple callback function
$('#uploadForm').ajaxForm(options);
});
must be something simple, but i'm tearing my hair out. your help is
greatly appreciated.
thanks
larry