September 2013
Intermediate to advanced
548 pages
12h 25m
English
The chat widget of the previous section can be easily extended to make a more realistic chat program. To do so, we’ll change the code for the chat widget to the following:
| websockets/chat2.html | |
| | <script type="text/javascript" src="./jquery-1.7.1.min.js"></script> |
| | <script type="text/javascript" src="./websock.js"></script> |
| | <link rel="stylesheet" href="./chat1.css" type="text/css"> |
| | |
| | <body> |
| | <h2>Chat</h2> |
| | <div id="idle"> |
| | <input id="nick_input"/> |
| | <button id="join">Join</button> |
| | <br/> |
| | </div> |
| | |
| | <div id="running"> |
| | <table> |
| | <tr> |
| | <td><div id="scroll"></div></td> |
| | <td><div id="users"></div></td> |
| | </tr> |
| | <tr> |
| | <td colspan= ... |
Read now
Unlock full access