Two Laptop Bag*
The moose likes JSP and the fly likes checkbox values in session Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "checkbox values in session" Watch "checkbox values in session" New topic
Author

checkbox values in session

Manish Sahni
Ranch Hand

Joined: Sep 09, 2009
Posts: 41

Hi,

My question is can i set the value of check boxes values in a session after clicking it
i.e. i want to add the checked value of check boxes in onClick event of check boxes .

What are the ways of achieving this??
Any help would be appreciable?


Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60794
    
  65

You'll either need to submit a form to the server, or use Ajax to do so.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Manish Sahni
Ranch Hand

Joined: Sep 09, 2009
Posts: 41

Bear Bibeault wrote:You'll either need to submit a form to the server, or use Ajax to do so.



sir, i am using pagination in my application and i have persisted the check box state using cookies
and java script.However when i check some check boxes and move to another page and their again i select some check boxes, then on submitting of the page the cookies are really hard to parse as they are encoded via JSON in cookies javascript and i have no idea , how to decode it and retrieve my cookies values.

So i thought that it would be a good idea to store the check box state in a session as i move along the page and retrieve all the values on submitting.

Also i am very novice to Ajax and can you tell me any idea or share a link or can you please tell me if i can do something else to my application?

My snippet of cookie javascript is as follows:-


 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: checkbox values in session
 
Similar Threads
Problem with persisting text box values in JSP
How to pass array of values(check Boxes) from popup window to opener window
JSTL and RadioButton
problem in logic
js code needed !