Officially DeCrazyyy
asked on
JSP BUTTON SWITCH USING SESSIONS
Using jsp sessions HOW TO SWITCH / (SWAP) THE LEFT AND RIGHT BUTTON WHEN THE CLICK BUTTON IS PRESSED.? refer screenshot. need to swich tthe button on click of the click button.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
<%
if(request.getParameter("b
session.setAttribute("stat
}
%>
<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.
form1.submit();
}
function button2()
{
document.form1.buttonName.
form2.submit();
}
// -->
</SCRIPT>
==========================
Hope above code helps to handle two buttons