function delete_records(id) {
	// console.log(id)
// 	let conf = confirm('Are you sure wants to delete');
	let conf = confirm('Warning! Are you sure wants to delete it? It will affect all the saved product.');
	var form = new FormData();
	form.append('id', id)
	if (conf == true) {
		let xmlhttp = new XMLHttpRequest();
		xmlhttp.onreadystatechange = function () {
			if (this.readyState == 4 && this.status == 200) {
				showAlert(this.responseText, "success");
				setTimeout(() => {
					location.reload();
				}, 1000);
			};
		}
		xmlhttp.open("post", baseUrl + 'Utilities/delete', true);
		xmlhttp.send(form);

	}
}
// common for delete function to delete records by id.
common for delete function to delete records by id.
common for delete function to delete records by id .
function delete_records(id) {
	let conf = confirm('Warning! Are you sure wants to delete it? It will affect all the saved product.');
	var form = new FormData();
	form.append('id', id)
	if (conf == true) {
		let xmlhttp = new XMLHttpRequest();
		xmlhttp.onreadystatechange = function () {
			if (this.readyState == 4 && this.status == 200) {
				showAlert(this.responseText, "success");
				setTimeout(() => {
					location.reload();
				}, 1000);
			};
		}
		xmlhttp.open("post", baseUrl + 'Utilities/delete', true);
		xmlhttp.send(form);
	}
}
function delete_records ( id ) { let conf = confirm ( 'Warning! Are you sure wants to delete it? It will affect all the saved product.' ) ; var form = new FormData ( ) ; form . append ( 'id' , id ) if ( conf == true ) { let xmlhttp = new XMLHttpRequest ( ) ; xmlhttp . onreadystatechange = function ( ) { if ( this . readyState == 4 && this . status == 200 ) { showAlert ( this . responseText , "success" ) ; setTimeout ( ( ) => { location . reload ( ) ; } , 1000 ) ; } ; } xmlhttp . open ( "post" , baseUrl + 'Utilities/delete' , true ) ; xmlhttp . send ( form ) ; } }
common for delete function to delete records by id.
common for delete function to delete records by id .
// console.log(id) // 	let conf = confirm('Are you sure wants to delete');