8a20de538c90d6eeb43a97ec088a8d398c2f995f
[samples/web/AppWidget.git] / pd / index.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2 <html>
3     <head>
4         <meta name="viewport" content="width=device-width, initial-scale=1" />
5         <title>Drop View</title>
6         <script>
7             window.addEventListener("boxmessage",
8             function(e) {
9                 document.getElementById("fromBox").innerHTML += unescape(e) + '<br>';
10             }, false);
11
12             function send () {
13                 window.appwidget.sendMessageToBox("Hello, Dynamic Box");
14             }
15         </script>
16         <style>
17             * {
18                 -webkit-user-select: none;
19                 -user-select: none;
20             }
21         </style>
22     </head>
23     <body bgcolor="#FF9966" text="#FFFFFF">
24         This is a Drop View.<br>A Drop View can control the Box.<br>
25         <input type="button" value="Send message to Box" onclick="send()" />
26         <div id="fromBox"></div>
27     </body>
28 </html>