Add and Update Using Php
Sample : corporate-page
Back Cancel
Source Code
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
var options = {
  target: '#message',
  beforeSubmit: showLoader,
  success: showResponse,
  url: 'php/controller.php',
  type: 'post',
  clearForm: 0,
  resetForm: 0
};
$('#admin_form').ajaxForm(options);

function showLoader() {
  $("#loader").fadeIn(200);
}

function hideLoader() {
  $("#loader").fadeOut(200);
};

function showResponse(msg) {
  hideLoader();
  $(this).html(msg);
  $("html, body").animate({
    scrollTop: 0
  }, 600);
}