Improve company productivity with a Business Account.Sign Up

x
?
Solved

how to maintain checkbox state across pages

Posted on 2009-05-04
7
Medium Priority
?
667 Views
Last Modified: 2013-11-05
i have implemented pagination in jsp.these values will come from DB. checkboxes are there against each record.when user checks 3 records in 1st page and goes to 2nd pages and again comes back to 1st page whatever user checked previously it should be checked.how to maintain this state in javascript ?How to achieve this functionality.i need to maintain the checkbox state across multiple pages?i searched in web and didnt find any proper answers.
0
Comment
Question by:chaitu chaitu
  • 3
  • 3
7 Comments
 
LVL 10

Expert Comment

by:bugada
ID: 24294781
I think you can store your checkbox state in a session cookie instantiated by javascript,
Otherwise you can pass selected checkbox to your backend program a save it in its session.
0
 
LVL 20

Author Comment

by:chaitu chaitu
ID: 24294796
can you provide any links related to this?
0
 
LVL 10

Expert Comment

by:bugada
ID: 24294964
Here a tutorial on how to handle cookie with javascript

http://www.elated.com/articles/javascript-and-cookies/

You can also use a library like HTTP.Cookies on JSAN that simplify the operation.
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
LVL 10

Accepted Solution

by:
bugada earned 1500 total points
ID: 24294972
ah remember that you can store a limited amount of data on cookies and normally only 20 cookies per domain are alloweb by browsers.
0
 
LVL 12

Expert Comment

by:Gibu George
ID: 24295009
If you are fetching records on page turn, then you can save it in the servers session object,
0
 
LVL 20

Author Comment

by:chaitu chaitu
ID: 24295130
anyhow i need to store the checked id's in session and compare those id's with the database values at client side and only those id's should be checked.

 i will try to write the code and let you know the status once it  is over.

i wonder i searched the web i didnt find proper reference.
0
 
LVL 20

Author Closing Comment

by:chaitu chaitu
ID: 31577521
not proper answer
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

This article discusses how to create an extensible mechanism for linked drop downs.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

584 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question