-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsurvey-website.html
58 lines (53 loc) · 2.04 KB
/
survey-website.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Webview of the App</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<nav class="navbar navbar-expand-md sticky-top navbar-dark" style="background-color: #0f0f61;" aria-label="Navigation bar">
<div class="container-fluid">
<a class="navbar-brand">Centro</a>
</div>
</nav>
</header>
<main>
<div class="main-container">
<div class="rectangle">
<iframe id='my-iframe' src="http://localhost:3000/"></iframe>
</div>
<div id="id-holder">
<button onclick="sendMessage('user_1')">User 1</button>
<button onclick="sendMessage('user_3')">User 3</button>
</div>
</div>
</main>
<footer class="footer py-2 mt-auto fixed-bottom text-center" style="background-color: #333333;">
<div class="container">
<span class="footer-sig" style="color: #FFFFFF;">© Centro 2023</span>
</div>
</footer>
<!-- The follwing links are to import/use the latest Bootstrap 5.3 version -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN"
crossorigin="anonymous"></script>
<script>
function sendMessage(userID) {
var iframe = document.getElementById('my-iframe');
console.log(userID)
var message = {
value: userID,
source : 'survey-parent'
};
iframe.contentWindow.postMessage(message, '*');
}
</script>
</body>
</html>