aspose file tools
The moose likes JSP and the fly likes check box validation Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "check box validation" Watch "check box validation" New topic
Author

check box validation

anvi kon
Ranch Hand

Joined: Jan 08, 2010
Posts: 133
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

Joined: Jan 10, 2002
Posts: 56157
    
  13

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.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56157
    
  13

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.
 
I agree. Here's the link: jrebel
 
subject: check box validation
 
Similar Threads
Coloring Table Rows
Error comes whilke compiling the jsp page
Passing row id from html table on jsp to Action Class in Struts
ArrayList size using JSTL
pass jstl value to javascript