Forcing choice window to refresh?

Hello! I'm failing horribly at Javascript and really need your kind help.

I'm trying to make a choice window with options that will change with the press of a button.
In order to do this, I set up my "show choice" command to have variables as values, like this:

◆Show Choices:\v[99], \v[100] (Window, Right, #1, #2)
:When \v[99]
◆
:When \v[100]
◆
:End
I have a parallel event that changes the variables whenever I press the key and console.logs the new value, so I know that everything works. So far, so good.
My problem: the list doesn't update.

I know that I in order to do this, I should refresh the command window, so it will re-draw the choices again. But I can't seem to find the right command! I've tried Window_choicelist.refresh(); choiceWindow.refresh(); $gameScreen.update and assorted variations with no avail.
What am I doing wrong?
Try

SceneManager._scene._messageWindow._choiceWindow.refresh()

Your first attempt won't work because you're attempting to call a function from the class definition itself rather than the instance of it that exists in your game. This only works with singleton functions, such as you'll find in DataManager.

Well, to put it more accurately, calling Window_ChoiceList.refresh() DOES call the refresh function of the class (though I believe you'd also need a .prototype. for it to work and even then it'll cause errors because it's missing information that the scene will pass to it) but that function itself won't do anything because the class itself doesn't exist in your game as an object. The instance of it is the _choiceWindow property of _messageWindow, which is itself a property of Scene_Map, which is what SceneManager._scene will return when you're on the map during play.
This works flawlessly, thank you!

Your first attempt won't work because you're attempting to call a function from the class definition itself rather than the instance of it that exists in your game. This only works with singleton functions, such as you'll find in DataManager.
I feared so, but I didn't knew how to point the program to the right instance. I guess the best solution next time is to use console.log(SceneManager._scene), so I can have a list of everything that's on the screen and all their proprieties.
As a web designer I get confused when talking about window with RPG Maker javascript, because I was going to for a moment, suggest
PHP:
document.location = document.location.href;
Which of course will "refresh" the browser page...

Somebody just PM'ed me about sending a variable to another tab and I suggested cookies or reading url parameters because I was thinking browser tabs and I don't know why.

Original thread: https://forums.rpgmakerweb.com/threads/forcing-choice-window-to-refresh.75630/