title: Websockets : onmessage is not firing.!
body: <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head lang="en"&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;title&gt;hi&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div id="conn"&gt; This : &lt;/div&gt;
  &lt;input type="text" id="text"&gt;
  &lt;input type="button" value="Button" onclick="func()" id="btn"&gt;
  
  &lt;script&gt;
      var fees=document.getElementById("conn");
      var btn=document.getElementById("btn");
      var conn = new WebSocket('ws://localhost:8080');
  
      function func()
      {
          var text=document.getElementById("text").value;
          conn.send(text);
          conn.send('any msg');
          text.innerHTML+= text+'&lt;br/&gt;';
      }
  
      conn.onopen = function(e) {
          console.log("Connection established!");
      };
  
      conn.onmessage = function(e) {
          console.log(e.data);
          fees.innerHTML+= e.data+'&lt;br/&gt;';
      };
  &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>This my code for running websocket. i am using ratchet websockets and xampp server.
  Main problem is the onmessage is not firing ! (I don't know why).</p>
  
  <p>Console shows that connection established!.
  No more errors on console.
  Please help ... thanks in advance.</p>