Ask coding questions

← Back to all posts
I am new to javascript. Can someone that is fluent in javascript help?
catchacoled (22)

So When you load the game you are supposed to put in a username and then go to an intro page and then it shows the game page and all of that works but when you get to the game page(or at least what I have of it so far) It won't run any commands. All I need is it to run one command so that I can get it to run the rest of the commands that I'm adding. Someone that is fluent in javascript please help. I have been working on fixing that issue for three days. Please help. For anyone that wants to help the function that you would be working in is the runCommand(); function.

Answered by SixBeeps (5056) [earned 5 cycles]
View Answer
SixBeeps (5056)

Don't use <form>s, they're used almost exclusively for sending client data over to a server, which you're not using here. Just use a normal <div>, and a <button> in place of the <input type="submit">. It looks like submitting a form refreshes the page, hence why that's happening here.

catchacoled (22)

Thank you, Ima try that and I'll let you know if it works or [email protected]

IcynDevz (764)

Well...I'm not that good at js. But you can visit w3schools to help you learn more.

hope this helped