• Post Reply Bookmark Topic Watch Topic
  • New Topic

check box validation  RSS feed

 
anvi kon
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a checkbox and one label field status like below.




so whenever I click checkbox..I need to show the status from (res.status="active") to (res.status="inactive") on gui.
how it is possible to change the value of status to inactive?

I need some help on this.




thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
res is a Java instance that resides on the server and only exists while the JSP is running to generate the HTML page to be sent to the browser.

Once the HTML page leaves the server, the JSP is done, and so is the res instance. Clicking on the checkbox in the browser on the client can have no effect on a Java instance that not only exists only on the server, but has ceased to exist long before the checkbox can be checked by the user.

You might find this article helpful in understanding how JSP operates and why affecting res is impossible.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What you can do is to use JavaScript to make any changes to the display that you'd like. But it has nothing to do with the res instance.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!