Search code examples
javascripttextserver-sideclient-side

Javascript inserting text not working server side


I'm very new to Javascript. So as an exercise, I wanted to create a script, which creates automatically accounts. As I found out, the text is just client sided! Is there any way to fix that problem?

The Code(only the important Part):

var TheTextBox = document.getElementById("top-register-email");
TheTextBox.value = TheTextBox.value + rndmail;
var TheTextBox = document.getElementById("top-register-nickname");
TheTextBox.value = TheTextBox.value + rndname;  
var TheTextBox = document.getElementById("top-register-password");
TheTextBox.value = TheTextBox.value + rndpw;

EDIT:
The Site I want to do this is not my own Site. I'm not trying to act like a human!


Solution

  • Welcome to the world of Client+Server development.

    You will have to send your data back to the server so that the server can commit it to your storage mechanism.

    That will take a lot more information before we can really be helpful.

    I would recommend finding a good tutorial on client/server development for the web.

    To summarize the problem you're facing: you are really needing two "applications". One is the web page that gathers/displays information, and the other is the server which stores/retrieves data.

    This is, of course, a VERY simplified explanation of the way things work.

    Good luck!