Source Code : Jsp form: Using Buttons
Java Is Open Source Programming Language You Can Download From Java and Java Libraries From http://www.oracle.com.
Click Here to download
We provide this code related to title for you to solve your developing problem easily. Libraries which is import in this program you can download from http://www.oracle.com.
Click Here or search from google with Libraries Name you get jar file related it
Jsp form: Using Buttons
<HTML>
<HEAD>
<TITLE>Using Buttons</TITLE>
</HEAD>
<BODY>
<%
//if(request.getParameter("buttonName") != null) {
if(request.getParameterNames() != null) {
%>
You clicked
<%= request.getParameter("buttonName") %>
<%
}
%>
<FORM NAME="form1" METHOD="POST">
<INPUT TYPE="HIDDEN" NAME="buttonName">
<INPUT TYPE="BUTTON" VALUE="Button 1" ONCLICK="button1()">
<INPUT TYPE="BUTTON" VALUE="Button 2" ONCLICK="button2()">
</FORM>
<SCRIPT LANGUAGE="JavaScript">
<!--
function button1()
{
document.form1.buttonName.value = "button 1"
form1.submit()
}
function button2()
{
document.form1.buttonName.value = "button 2"
form1.submit()
}
// -->
</SCRIPT>
</BODY>
</HTML>
Thank with us