-
Notifications
You must be signed in to change notification settings - Fork 0
/
address.html
68 lines (57 loc) · 2.04 KB
/
address.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>EasyKey</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="manifest" href="assets/manifest.json" />
<link rel="stylesheet" href="assets/bootstrap.min.css">
</head>
<body>
<nav class="navbar navbar-light bg-light">
<a class="navbar-brand" href="#">EasyKey - Address</a>
</nav>
<br><br>
<div class="container">
<div class="form-group">
<label for="aadhar">Full Address</label>
<textarea name="address" id="address" cols="30" rows="10" class="form-control" placeholder="Full Address"></textarea>
</div>
<br>
<button class="btn btn-success btn-block btn-lg" id="next">Next</button>
</div>
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('sw.js');
}
</script>
<script src="https://www.gstatic.com/firebasejs/5.9.4/firebase.js"></script>
<script src="https://code.jquery.com/jquery-3.4.0.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script>
<script>
// Initialize Firebase
var config = {
apiKey: "AIzaSyAc9SAym94EeJbciccRESpgNm4WISzl-GM",
authDomain: "easykey-53a02.firebaseapp.com",
databaseURL: "https://easykey-53a02.firebaseio.com",
projectId: "easykey-53a02",
storageBucket: "",
messagingSenderId: "1096893639801"
};
firebase.initializeApp(config);
var db = firebase.database();
</script>
<script src="assets/main.js"></script>
<script>
$("#next").click(function(){
var username = localStorage.getItem("signup_username");
var address = $("#address").val();
db.ref("users/" + username).update({
"address" : address,
});
window.location.href = "emergency.html";
});
</script>
</body>
</html>