0
How send form data to server by what type of code using
server to java script web page connecting
1 Answer
+ 1
using javascript:
you would have a "onsubmit=submit()" or something in the <form> when the submit is pressed, it would go to that function. you would need to gather the information via, var num = document.getElementBy...('ele').value; ... and ele customized to the input type and id, classname whatever it is. make it an id, therefore it is unique and not getting alot of them. may need to access via [0] if more than one exist.
in php:
you would have the action="fileName.php" and on submit, this php file would be accessed, not a pro at php so someone else should touch on the process here.
if you have a java servlet:
the action="servletName" and this servlet.java would be launched. all of the information will be accessed in the doPost method, using the request object. saying string name = request.getParameter("name"); assuming there is a form input field with the name="name"
i would recommend just connecting to firebase instead of an actual server, if you are starting out. all that is a little more complex.
for using node.js, i dont have any expierence in that either.
hope this helps