<?xml version = "1.0" encoding="utf-8" ?> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
"DTD/xhtml1-strict.dtd"> | |
<html xmlns = "http://www.w3.org/1999/xhtml"> | |
<head> | |
<title>NDN Put</title> | |
<script type="text/javascript" src="../java_socket_bridge.js"></script> | |
<script type="text/javascript" src="../Helper.js"></script> | |
<script type="text/javascript"> | |
function run(){ | |
var contentName = document.getElementById('contentname').value; | |
var content = document.getElementById('content').value; | |
var connector = new NDN(); | |
var result = connector.put( contentName, content ); | |
document.getElementById('result').innerHTML = 'Content \'' + content + | |
'\' was published with content name \'' + contentName +'\'. Result:<br/>' + | |
result; | |
} | |
</script> | |
</head> | |
<body > | |
<form> | |
<div> | |
<p>Please Enter a Content Name:</p> | |
<input id="contentname" type="text" name="CONTENTNAME" value="/demo/message" /> | |
<p>Please Enter the Content:</p> | |
<textarea id="content" cols="40" rows="5" name="CONTENT" >This works!</textarea> | |
<br /> | |
</div> | |
</form> | |
<div> | |
<button onclick="run()">PUT!</button> | |
</div> | |
<div > | |
<applet id="JavaSocketBridge" archive="../JavaSocketBridge.jar" code="JavaSocketBridge.class" width="0" height="0"> | |
</applet> | |
</div> | |
<p id="result"></p> | |
</body> | |
</html> |