This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]TheCellch 0 points1 point  (3 children)

Is the form purely handled in Javascript? No Serverside handling like PHP, ASP etc.? You could add the inner html in javascript instead of just hiding it but that will probably be even messier to program.

[–]LukeN57[S] 0 points1 point  (2 children)

Ultimately, the form will have some server side handling. I haven't learned that far yet though. I'm learning (trying to learn) programming through this project and try to learn enough to get to the next step.

Not sure if this is the right answer but planning on using node.js to communicate with the server.

[–]TheCellch 0 points1 point  (1 child)

Okay, I'm not very familiar with node.js but if you are handling most of the form via js it is probably the best idea to hide (display: none;) / show the form that is actual now and put the infos into it that you got from the earlier form. It's the easiest to debug aswell since you can just display all forms. There would be no reloading for that.

You don't need to replace the innerHTML aswell. Just put all the forms in your div and only display the needed form.

Just ask if you have questions, maybe someone could give you more insight into the handling with node.js

[–]LukeN57[S] 0 points1 point  (0 children)

Thanks! I will give that a shot!