-
Notifications
You must be signed in to change notification settings - Fork 0
/
contact.html
40 lines (38 loc) · 1.66 KB
/
contact.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
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="all.css">
<title></title>
</head>
<body id="contactbody">
<div class="card">
<ul class="list-group list-group-flush">
<li class="list-group-item" id="contactheader">Contact</li>
<li class="list-group-item" id="makelovewithfriend"></li>
</ul>
</div>
</body>
<script src="https://www.gstatic.com/firebasejs/5.5.6/firebase.js"></script>
<script src="main.js"></script>
<script type="text/javascript">
var msgRef = firebase.database().ref('/message/contact');
msgRef.on('value',function(snapshot){
var val = snapshot.val();
let list = " ";
$.each(val,function(i,item){
console.log(i,item);
list = `${list}<li class="list-group-item">${item.FriendName}<br>${item.FreindNumber}</li>`
})
$('#makelovewithfriend').html(list);
// const contactsnap = snapshotToArray(snapshot);
// console.log(contactsnap);
// // document.getElementById("changable-username").innerHTML = profilesnap[3];
// document.getElementById("changable-firstname").innerHTML = profilesnap[2];
// document.getElementById("changable-lastname").innerHTML = profilesnap[1];
// document.getElementById("changable-email").innerHTML = profilesnap[0];
});
</script>
</html>