0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 3.149.243.29


Current Path : /var/www/html/oums/js/
Upload File :
Current File : /var/www/html/oums/js/send_sms.js

function load_page() {
	load_page_data(
		window.location.href.substr(window.location.href.lastIndexOf("/") + 1)
	);
	clrs_data();
}

function clrs_data() {
	document.getElementById("txtmessnumb").value = "";
	document.getElementById("txtmesstext").value = "";
}

function send_sms() {
	if (document.getElementById("txtmessnumb").value == "") {
		alert("Please enter 10 digit mobile no!");
		txtmessnumb.focus();
		return false;
	}

	if (document.getElementById("txtmesstext").value == "") {
		alert("Please enter text message!");
		txtmesstext.focus();
		return false;
	}

	$.ajax({
		type: "POST",
		url: "src/send_sms.php",
		data: {
			send_numb: document.getElementById("txtmessnumb").value,
			mess_text: document.getElementById("txtmesstext").value,
		},
		cache: false,
		beforeSend: function () {
			show_process();
		},
		success: function (data) {
			hide_process();
			alert("SMS sent successfully!");
			clrs_data();
		},
		error: function (data) {
			hide_process();
			alert("Error in sending SMS!");
			clrs_data();
		},
	});
}