Jeff Thompson | e06b31e | 2012-09-30 17:19:19 -0700 | [diff] [blame] | 1 | <?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 Thompson | 38422f4 | 2012-11-15 00:20:39 -0800 | [diff] [blame] | 10 | <script type="text/javascript" src="../Helper.js"></script>
|
Jeff Thompson | e06b31e | 2012-09-30 17:19:19 -0700 | [diff] [blame] | 11 |
|
| 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> |