-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathredudant.txt
35 lines (34 loc) · 1.16 KB
/
redudant.txt
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
27
28
29
30
31
32
33
34
35
/* <script type="text/javascript">
function sendEmaili() {
var name = "Admin Warning";
var email = "[email protected]";
var subject = "Warning: Number of persons limit exceeded!!!";
var body = "Emergency! people limit exceeded....";
if (isNotEmpty(name) && isNotEmpty(email) && isNotEmpty(subject) && isNotEmpty(body)) {
$.ajax({
url: 'sendEmail.php',
method: 'POST',
dataType: 'json',
data: {
name: name.val(),
email: email.val(),
subject: subject.val(),
body: body.val()
},
success: function(response) {
$('#myForm')[0].reset();
$('#noti').text("Message sent successfully.");
}
});
}
}
function isNotEmpty(caller) {
if (caller.val() == "") {
caller.css('border', '1px solid red');
return false;
} else {
caller.css('border');
return true;
}
}
</script>