views:

72

answers:

3

in gmail if you check mark email 4 then move to different set of 50 or 25 records and mark selection 26 then both 4 and 26 are retained if you move back and forth.

How does google do this?

would it be possible to do something like this in a page that brings only 50 records and when NEXT is clicked...it again goes to DB to bring next set of 50 records.

+4  A: 

Take a close look at the url. Only the hash part of it changes. Which means you don't really load new pages when you click things on Gmail. They just change the elements shown to you with javascript.

Similar thing could be done with page loads if you use localStorage or sessionStorage

You could do the page you're describing with Ajax techniques.

Epeli
+7  A: 

You don't technically change pages, it's all the same page, the content is just changed dynamically with JavaScript.

Nate Shoffner
+1  A: 

The inner pages are most likely loaded using AJAX. Kind of like iFrames, you monitor the links that are clicked and only load the inner part of what you're after so that you aren't loading things twice...

It's possible that these are saved in JavaScript or Cookies... I would probably store them as a JavaScript array of selected checkboxes personally... depending on how much load you're already giving to the user.

Dominic Watson