Skip to content
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

Open
nuvasuper opened this issue Jun 3, 2016 · 4 comments
Open

failed chat message event handling #26

nuvasuper opened this issue Jun 3, 2016 · 4 comments

Comments

@nuvasuper
Copy link

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.

@Almenon
Copy link

Almenon commented Aug 24, 2016

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

@halink0803
Copy link

@rauchg can you change the tutorial following this then newbie will not be confused why socket.io not working.

@dsprogis
Copy link

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.

@eudaimyst
Copy link

Just adding my voice to the chorus that this should be updated. Thanks for the issue and fix #13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants