HTML and CSS Reference
Figure 4.11. As the user types into the chat, the letters will be compared to words in the plan and matches will be
shown in a drop-down list, where they can be selected using the down arrow.
the HTML5 features, this section won't cover the details; a suitable script is included in the
code download. Add the file to the working directory of the chat application.
To implement auto-complete, you need to set up message handlers on both the planner and
the chat applications. The chat application will wait for the user to start typing and then
send the letters of each word as they are typed to the parent window. The parent window
will receive the message, compare the typed letters to the labels existing within the plan
object, and send a message back with a list of matching words. The code for the chat ap-
plication part of this is shown in the following listing; add it to the chat.js file in the SSE