(07-22-2017, 09:06 AM)Paradinight Wrote: 1.
<button type="submit" id="btnSave" onclick="save()" class="btn btn-effect"><i class="fa fa-plus-circle" aria-hidden="true"></i> proceed...</button> <- type="button"
2. save_method <- has no value and because of the empty value url is empty too
Sir,
In the save function, the if else condition for save_method is equals to 'add' and there's also a value for the url. Its just I remove this function upon calling the modal for adding method. Originally this CRUD operation is made using MODAL and I want to create a one-page crud without the modal.
Code:
function add_agency() {
save_method = 'add';
$('#agencyForm')[0].reset();
$('.form-group').removeClass('has-error');
$('.help-block').empty();
$('#modal_form').modal('show');
$('.modal-title').text('Add Agency');
}