Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

How to use ajaxForm

HTML

<form id = "frm" action = "servlet">
<input type = "button" onclick = "return submit()">
</form>

script

<script>
function submit(){
$j('#frm').ajaxForm({
dataType : 'json',
url: $j('#frm').attr('action'),
enctype: "multipart/form-data",
success : function(result){
  alert('success');
}
})

document.getElementById('frm').submit();

</script>

I want to see the result. But I do not see success.

Why not?

Comments