-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
failed chat message event handling #26
Comments
Ran into same problem. Either the code should be activated upon document ready or it should be moved below body. Looks like someone already submitted a pull request for it: #13 |
@rauchg can you change the tutorial following this then newbie will not be confused why socket.io not working. |
Yeah, this issue had me scratching my head for a while! By moving the script section after the body, it started working. Rather than reading the FAQ's I googled the problem and there are a bunch of posts on StackOverflow about this problem. There are also a few about res.sendfile (deprecated). It would be nice to see both cleaned up in the tutorial. |
Just adding my voice to the chorus that this should be updated. Thanks for the issue and fix #13 |
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.The text was updated successfully, but these errors were encountered: