Make sure to pick = followed by document and then getElementById, "messages".
=
document
getElementById
"messages"