-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsecond-page.html
101 lines (95 loc) · 2.52 KB
/
second-page.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<style>
a {
display: inline-block;
margin-bottom: 0;
font-weight: 400;
text-align: center;
white-space: nowrap;
vertical-align: middle;
cursor: pointer;
background-image: none;
border: 1px solid transparent;
padding: 6px 12px;
font-size: 14px;
line-height: 1.42857143;
border-radius: 4px;
user-select: none;
color: #fff;
background-color: #337ab7;
border-color: #2e6da4;
}
/* The Modal (background) */
.modal {
display: none; /* Hidden by default */
position: fixed; /* Stay in place */
z-index: 1; /* Sit on top */
padding-top: 100px; /* Location of the box */
left: 0;
top: 0;
width: 100%; /* Full width */
height: 100%; /* Full height */
overflow: auto; /* Enable scroll if needed */
background-color: rgb(0, 0, 0); /* Fallback color */
background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */
}
/* Modal Content */
.modal-content {
background-color: #fefefe;
margin: auto;
padding: 20px;
border: 1px solid #888;
width: 80%;
}
/* The Close Button */
.close {
color: #aaaaaa;
float: right;
font-size: 28px;
font-weight: bold;
}
.close:hover,
.close:focus {
color: #000;
text-decoration: none;
cursor: pointer;
}
</style>
<body>
<div style="margin-bottom: 15px">
<a onclick="goToBackToApp()" > back to app</a>
</div>
<a href="./index.html">back plz</a>
<h1>welecome second page</h1>
<!-- Trigger/Open The Modal -->
<button id="myBtn" onclick="performClick()">Open Modal</button>
<h1 id="h1"></h1>
</body>
<script>
function performClick() {
// window.Android.performClick()
console.log('clicked modal');
// alert('u clicked');
}
function fillDetails(jsonData) {
console.log(jsonData);
// window.parent.postMessage(jsonData, '*')
document.getElementById('h1').innerHTML = jsonData;
}
window.onmessage = function (event) {
console.log(event);
// alert(event.data);
};
function goToBackToApp() {
window.parent.postMessage('journeyCompleted', '*')
console.log("close");
}
</script>
</html>