0
Help: jsp + servlet
i am trying to make a form. There are two button login and registration. one button will lead to one servlet and another button will lead to another servlet. But i think..we can use one submit button in a form. so how can i use another submit button which will lead to a servlet class?
1 Resposta
0
first of all it might be easier to separate thoose forms but anyway
when you click on one of thoose buttons and stop the default event (event.preventDefault())
if you clicked on the button for the login, change the action attribute of your form to the page you want to get redericted to. now select your form with js-dom and call the submit () function and you are done