/* Add/Edit Certificate */ $("form#certForm").live('submit',function() { if($("#certForm").valid() == false) return false; var options = { type: "post", url: "ajax-servers/table-form.php", success: function(data) { var expTblRow = data; $('#certForm').clearForm(); if($('#cert_id').val()!='') { var expId = $('#cert_id').val(); $('#delcert'+expId).replaceWith(expTblRow); } else { $('#certTbl td.dataTables_empty').parent().html(''); $(expTblRow).appendTo("#certTbl tbody"); } runEffect('#dialogcert'); } }; $('#certForm').ajaxSubmit(options); return false; });