title: Using socket.io and node.js, button click does not trigger event
body: <p>On button click, the message 'door' should appear on the console but it isn't.    </p>
  
  <p>Client code :</p>
  
  <pre><code>&lt;button type="button" onClick = "doorClicked()"&gt;Door&lt;/button&gt;
  
  function doorClicked(){
          socket.emit('door', function(data){
              socket.send("Door");
          });
  }
  
  Server side :
  io.sockets.on('connection', function(socket){
  socket.on('door', function(data){
          console.log('Door');
      });
  }
  </code></pre>