__form__
<script type="text/javascript">
    $(document).ready(function () {
        $("#__form_id__").ajaxForm({ 
            dataType: "json",
            beforeSubmit: function (formData, jqForm, options) {
                bx_loading($("#__form_id__"), true);
            },
            success: function(oData) {
                $(".bx-popup-applied:visible").dolPopupHide();

                __object__.processResult(oData);
            }
        });
    });
</script>