Message window doesn't show when called more than once

Hi

I'm writing this code in a plugin.
I want to display another text message window using the $gameMessage object. The first message "Do you want to have dinner?" will show correctly including the choices of "Yes" and "No" but after I chose "Yes" or "No" the next
$gameMessage.add("This doesn't show up") just doesn't show up but the console log does display "Yes!" or "No!" indicating the other code is correct.
How do I get the message window to show up after the player makes the choice.

$gameMessage.add("Do you want to have dinner?");
$gameMessage.setChoicePositionType(1);
$gameMessage.setChoices(["Yes", "No"], 0, -1);

$gameMessage.setChoiceCallback(function(responseIndex) {
if (responseIndex == 0) {
$gameMessage.add("This doesn't show up");
console.log("Yes!");
}
if (responseIndex == 1) {
$gameMessage.add("This doesn't show up too");
console.log("x =" + x);
console.log("No!");
}
} );

I've moved this thread to Learning Javascript. Thank you.

Ok. thanks. This is my first post. Will look out next time. Anyone can help? Much appreciated.
$gameMessage.newPage();
$gameMessage.add("This doesn't show up");
console.log("Yes!");

I think would work. Not testing that yet but yeah. Is there a reason you don't use the rpgmaker editor for this? I don't see a reason to do this all in JavaScript as is

Original thread: https://forums.rpgmakerweb.com/threads/message-window-doesnt-show-when-called-more-than-once.122207/