Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!doctype html>
- <html>
- <head>
- <title>Add Two Ints</title>
- <script type="text/javascript" src="http://brown-ros-pkg.googlecode.com/svn/trunk/experimental/rosbridge/ros.js"></script>
- <script type="text/javascript">
- var con = new Connection('ws://localhost:9090');
- con.setOnOpen(function() {
- con.callService('/add_two_ints','[8,7]',function(rsp) {
- con.callService('/add_two_ints','['+rsp.c+',10]',function(rsp) {
- con.callService('/add_two_ints',[17,rsp.c],function(rsp) {
- document.getElementById("output").innerHTML = rsp.c;
- });
- });
- });
- });
- </script>
- </head>
- <body>
- answer: <span id="output"></span>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement