You can do it with Javascript, assuming you don't need to "do" anything at
the sever with each new value (increased or decreased).
If that's the case then you should do it with Javascript, to spare a round
trip to the server just to modify a number in the user interface.
you can have something like this
...
<script language="javascript">
function increase() {
document.myForm.myID.value += 1;
}
function decrease() {
document.myForm.myID.value -= 1;
}
</script>
...
<INPUT type=text id="myID" value="1">
I think this might do the trick.
Regards,
Rui
> -----Original Message-----
> From: S. Jyotinarayan [mailto:[EMAIL PROTECTED]]
> Sent: Quinta-feira, 22 de Março de 2001 12:17
> To: [EMAIL PROTECTED]
> Subject: sessions - variable
>
>
> I have a jsp page with 'increase' and 'decrease' buttons and
> a variable. I
> want the variable to be initalised to 1 when this jsp page is
> first opened.
> And the variable should increase and decrease as I press on
> the respective
> buttons and be displayed on the same page. How could I do this.
> Thanx a lot in advance.
> JNS
>
> ==============================================================
> =============
> To unsubscribe: mailto [EMAIL PROTECTED] with body:
> "signoff JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set
> JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets