In your example on http://socket.io/get-started/chat/, in index.html, the code for binding the event http://socket.io/get-started/chat/ etc is in the lines BEFORE the form is declared <form action=""> <input id="m" autocomplete="off" /><button>Send</button> </form> Which causes it to fail unless reordered! The <script> section for that code ought to go after the form has been created.
In your example on http://socket.io/get-started/chat/, in index.html, the code for binding the event
http://socket.io/get-started/chat/etc is in the lines BEFORE the form is declared<form action=""> <input id="m" autocomplete="off" /><button>Send</button> </form>Which causes it to fail unless reordered! The <script> section for that code ought to go after the form has been created.