Advertisement
Guest User

int_test.html

a guest
Apr 16th, 2012
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 0.66 KB | None | 0 0
  1. <!doctype html>
  2. <html>
  3. <head>
  4.   <title>Add Two Ints</title>
  5.   <script type="text/javascript" src="http://brown-ros-pkg.googlecode.com/svn/trunk/experimental/rosbridge/ros.js"></script>
  6.   <script type="text/javascript">
  7. var con = new Connection('ws://localhost:9090');
  8. con.setOnOpen(function() {
  9.   con.callService('/add_two_ints','[8,7]',function(rsp) {
  10.     con.callService('/add_two_ints','['+rsp.c+',10]',function(rsp) {
  11.       con.callService('/add_two_ints',[17,rsp.c],function(rsp) {
  12.         document.getElementById("output").innerHTML = rsp.c;
  13.       });
  14.     });
  15.   });
  16. });
  17.   </script>
  18. </head>
  19. <body>
  20.   answer: <span id="output"></span>
  21. </body>
  22. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement