JSP BasicsBeginning-level questions on JSP. More advanced coders should post to Pro JSP.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the JSP Basics section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
A single JSP page havin one submit & normal button
Hi,
I have a single jsp wherein there is a single submit button which does all the validations when the form is submitted and a normal button which checks for just 2 validations and depending on that queries the database to get the rest of the results.Problem i am facing is Submit buttons functions are working fine but i am not able to code the normal button functons. Please refer the code.how should i make the normal button validate the first 2 fields and then go forward to act as a submit button?
try using the click() method of the button like after you do the validation try to submit the form using the following line of code.
document.getElementById("formId").submit();
make sure that you add the id atribute for the form tag.