This is the HTML file with two buttons on it, I want to transfer control to different
servlets on the button clicks, but when I press the buttons the onclick() event doesn't seem to work. Is there any other way to assign multiple actions to a single form?
input type = "submit" name = "click1" onklick = gotoServlet1();
input type = "submit name = "click2" onklick = gotoServlet2();
gotoServlet1 and gotoServlet2 are javascript functions
function gotoservlet1(){
document.form.action = "./servlet1";
document.form.submit;
}
function gotoservlet2(){
document.form.action = "./servlet2";
document.form.submit;
}
This is not working, pls advice me...
Thanks