blob: 1fdf5b9519412576ae130fa22d0a892e2b599697 [file] [log] [blame]
Jeff Thompsone06b31e2012-09-30 17:19:19 -07001<?xml version = "1.0" encoding="utf-8" ?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3"DTD/xhtml1-strict.dtd">
4<html xmlns = "http://www.w3.org/1999/xhtml">
5
6<head>
7 <title>NDN Put</title>
8 <script type="text/javascript" src="../java_socket_bridge.js"></script>
9
Jeff Thompson38422f42012-11-15 00:20:39 -080010 <script type="text/javascript" src="../Helper.js"></script>
Jeff Thompsone06b31e2012-09-30 17:19:19 -070011
12 <script type="text/javascript">
13 function run(){
14 var contentName = document.getElementById('contentname').value;
15 var content = document.getElementById('content').value;
16
17 var connector = new NDN();
18 var result = connector.put( contentName, content );
19
20 document.getElementById('result').innerHTML = 'Content \'' + content +
21 '\' was published with content name \'' + contentName +'\'. Result:<br/>' +
22 result;
23 }
24
25 </script>
26
27</head>
28<body >
29 <form>
30 <div>
31 <p>Please Enter a Content Name:</p>
32
33 <input id="contentname" type="text" name="CONTENTNAME" value="/demo/message" />
34
35 <p>Please Enter the Content:</p>
36
37 <textarea id="content" cols="40" rows="5" name="CONTENT" >This works!</textarea>
38
39 <br />
40 </div>
41 </form>
42 <div>
43 <button onclick="run()">PUT!</button>
44 </div>
45 <div >
46 <applet id="JavaSocketBridge" archive="../JavaSocketBridge.jar" code="JavaSocketBridge.class" width="0" height="0">
47 </applet>
48 </div>
49
50 <p id="result"></p>
51
52</body>
53</html>