MV Browser variable string to $gameVariable string

Hello everyone, I need some help for a quick easy interaction.
My game is hosted in a website and i make the player to enter his name into a website box.
This name, a string, is encoded in a variable, that I can check in the browser console as "name.player"

e.g. --> player writes Jake into that website text box --> variable name.player value is set as Jake

Code:
name.player = "Jake"

now I'd like to set that variable.name string into a game Variable, but the simple script

Code:
var name.player = $gameVariables.setValue(1);

from RPG maker won't set the value (variable 1 is still 0).

How can I execute a script to make that ?

Is a plugin needed? Does it exist already?

Thank you.
Code:
var name.player = $gameVariables.setValue(1);
This is trying to declare name.player as the setValue function (which takes two parameters but you only gave it one)

Try
$gameVariables.setValue(1, name.player);
but that might not work either. I don't know how you have it set up to pass outside variables into the game
This is trying to declare name.player as the setValue function (which takes two parameters but you only gave it one)

Try
$gameVariables.setValue(1, name.player);
but that might not work either. I don't know how you have it set up to pass outside variables into the game

I've tried that too, won't work unfortunately. Well that variable is actually within the game, because the text string comes from a box that I generate from the index.html file of the game folder itself, so I guess it's still retrievable, but can't guess how
You're going to have to show your code for how you are collecting and storing the variable and how you are passing it into the game.
You're going to have to show your code for how you are collecting and storing the variable and how you are passing it into the game.

I need to pass it into the game indeed, if I had that code then no need to ask

The store of variable is really a var name.player = input text from that window
I need to pass it into the game indeed, if I had that code then no need to ask

The store of variable is really a var name.player = input text from that window
The RPG Maker game is embedded into the website but its internal structure is not itself a part of it, so there is no intrinsic link between them.

If you want them to share data, what you'll have to do is store the input value on the server side and then have your RPG Maker project connect to the same server to retrieve it.
The RPG Maker game is embedded into the website but its internal structure is not itself a part of it, so there is no intrinsic link between them.

If you want them to share data, what you'll have to do is store the input value on the server side and then have your RPG Maker project connect to the same server to retrieve it.
so there's no way to read the browser stored variable without a server?

what's the easiest way to make a GET request to my server?
so there's no way to read the browser stored variable without a server?

what's the easiest way to make a GET request to my server?
Hmm.

You said that you added the input box to the index.html file in the project itself, right?

Gimme a sec.

Edit: What is the element's id or name in the index page? Can you show me the tag for it?
Hmm.

You said that you added the input box to the index.html file in the project itself, right?

Gimme a sec.

Edit: What is the element's id or name in the index page? Can you show me the tag for it?

name.player
name.player
Try

$gameVariables.setValue(1, document.getElementById("name.player").value);
tried in a script but doesn't work; what if I define the variable in a js file I put on the js folder instead than from html.com? I can create an object "playername" in a js file.

EDIT: i've creates an object "nameplayer" with the properties of the name and other details. Maybe it's easier to retrieve object properties?
If anyone needs, I've managed to make it work (object is nameplayer, properties variable: name).
Of course I now create the textbox within the game, from a js plugin and so it's internal)

Code:
$gameVariables.setValue(1, nameplayer.variable["name"]);
If anyone needs, I've managed to make it work (object is nameplayer, properties variable: name).
Code:
$gameVariables.setValue(1, nameplayer.variable["name"]);
If you're collecting the name input from within the game, why bother with the object at all and not just put the player input into control variable 1?
If you're collecting the name input from within the game, why bother with the object at all and not just put the player input into control variable 1?
well that's way easier... guess it's because it started outside so in my mind there was that probablem to be solved lol

Original thread: https://forums.rpgmakerweb.com/threads/browser-variable-string-to-gamevariable-string.159804/