I am trying to use ajaxForm(options) to execute some methods before submitting the form.
Below are the options that I have set:
var options = {
target : '#output1',
success : showJsonResponse,
beforeSubmit : validateFieldNotEmptyCallLoc,
dataType : 'json'
};
$('#formId').ajaxForm(options);
Regardless of what beforeSubmit returns ; true or false, success method -> showJsonResponse is called. Some article said "success " is replaced by "done" since jquery 1.8. Tried that doesn't like that "done" thing either
Edit 1
<input id="btn-font" type="submit" onclick="return callAjaxSubmitFunction();">
onclick function makes the $("#formId").submit();