-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathemergency.html
115 lines (115 loc) · 3.98 KB
/
emergency.html
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<title>emergency</title>
<link rel="stylesheet" href="./style-emergency.css">
<script>
function phoneNumberValidation(phoneNumber)
{
var phoneno = /^\d{10}$/;
if(phoneNumber.match(phoneno))
{
return true;
}
else
{
alert("Enter valid 10 digit number like this 9876543210.");
return false;
}
}
function isNumberKey(evt)
{
var charCode = (evt.which) ? evt.which : event.keyCode;
if (charCode != 46 && charCode > 31 && (charCode < 48 || charCode > 57))
{
alert("Enter Number");
return false;
}
return true;
}
function validate()
{
var valid = true;
var phone = document.getElementById('phone').value;
if(phone!='')
{
valid = phoneNumberValidation(phone);
}
if(valid==false)
{
return false;
}
else
{
return true;
}
}
</script>
</head>
<body>
<!-- partial:index.partial.html -->
<!---link css/js/php:
css/contact.css
js/contact.js
php/contact_me.php
--->
<a href="index.html"><img alt="Mech"src="logo-pro.png" width="100px" height="100px" style="float:right; margin-right:10em;"></a>
<div class="contact container shadow" id="contact_form">
<div class="contact row header">
<h2>EMERGENCY</h2>
<h3>Fill up this small form, to get service delivered to you in minutes!</h3>
<h3>Kindly turn on your device's location for better performance.</h3>
<div id="contact_results"></div>
</div>
<form name="myForm" action="submit1.php" method="post" onsubmit="return validate();">
<div class="contact row body" id="contact_body">
<div class="contact-elements">
<ul>
<li>
<p class="left">
<label for="name">NAME</label>
<input type="text" name="name" id="name" class="input-field" placeholder="XYX" />
</p>
<p class="pull-right">
<label for="phone2">PHONE NUMBER<span class="req">*</span></label>
<input type="text" name="phone" id="phone" maxlength="15" required="true" class="tel-number-field long" onkeypress="return isNumberKey(event)" placeholder="123 456 7890" />
</p>
</li>
<div class="center-btn" style="position:relevant; height:5vh;">
<li>
<label for="email">ANY LANDMARK?</label>
<input type="text" name="landmark" id="landmark" class="input-field" placeholder="Behind ABC school" />
</li>
</div>
<br><br>
<div class="center-btn">
<li>
<iframe src="gp.html" width=400px height="175px"></iframe>
</li>
</div>
<li>
<div class="contact divider"></div>
</li>
<li>
<label for="message">DESCRIPTION OF THE PROBLEM</label>
<textarea cols="46" rows="8" name="message" id="message" class="textarea-field" placeholder="I have a flat car tire, please bring a tire with you and also a jack and other things required"></textarea>
</li>
</ul>
</div>
<div class="center-btn" style="position:relevant; height:5vh;">
<li style = "list-style-type: none;">
<input id="submit_btn" class="btn btn-submit" type="submit" value="Submit"/>
</li>
</div>
</div>
</form>
</div>
<div style="margin: 50px 0; display: flex; align-items: center; justify-content: center; width: 100%; font-size: 36px;">
<a style="display: block; text-align: center; color: #555; text-decoration: none; margin-right: 15px; " href="index.html"><i class="fas fa-home" style="color: #1da1f2; margin-right: 5px;"></i>Get back to our home page</a>
</div>
</!---contact-form--->
<!-- partial -->
<script src='https://cdnjscloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script><script src="./emergency.js"></script>
</body>
</html>