Forum Moderators: open

Message Too Old, No Replies

Best way to count checked boxes over multiple pages

         

surfgatinho

8:58 pm on Apr 16, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I'm just wondering what the best way to go about keeping a running total of checked checkboxes over more than one page.

The site lists properties from a database with, say 10 results per page. Each item has a checkbox next to it and this will need to be counted if it is checked or not and the running total displayed on the page.

This would be nice and easy on one page but over 10 or 20 it is a little trickier.

Does it need to be an AJAX job or could it be JS writing to a cookie?

Anyway, suggestions welcome.

Thanks in advance,
Chris

httpwebwitch

1:29 pm on Apr 17, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



AJAX would be one way, cookies another, you could do it with a Session (which is really just a cookie with flair).

surfgatinho

9:20 pm on Apr 17, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Sessions, yes! I forgot about sessions.
The solution involves sessions, ajax and lots of exploding and imploding!

httpwebwitch

10:42 pm on Apr 17, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



imploding! My goodness. Please be careful.