• Theory
  • Theory

The third program: “Instant messenger”

The to-do list is done. You can now finally go and take a break. Just as you reach to turn off the desk lamp, the paw of the boss stops you. He has another little thing he wants you to do.

Meow! You need to program an instant messaging app. It must have the following functionality:

  • The message template is in the template tag with the message-template ID.
  • The new message is added to the end of the container with the chat-content class.
  • To add a new message, you need to enter text in the input field (an element with the chat-form-input class) and click the “Submit” button (which sends data from the form with the chat-form class).
  • The message block (with the chat-message class) must contain the message text, a delete button, and a username.
  • To delete the message, you need to click the cross button (an element with the chat-message-button class). This button appears when you hover the mouse over a message.

If you can complete this assignment, then I will let you take a vacation!

When you are ready, press the Boss, here’s your program! button. Tests will be launched that verify your solution.

  • index.html
HTML
HTML

You’ve gone to a different page

Click inside the mini-browser to shift the focus onto this window.

100%
Granny Muffin

Easy there, pal!

To access the Working with DOM challenges in the Deep dive in JavaScript for browsers, you need to sign up and subscribe first.