Web Hosting Talk







View Full Version : JS dashboard callbacks?


robjohnston
05-11-2009, 04:27 PM
Hi all, I'm writting a web app to display some MI and I'm working on a dashboard type thing.

Based on the script used here http://host.sonspring.com/portlets/ I've got the initial page working pretty much as I want it.

I'd like it to save the state of the page for each user (layout etc) but I'm unsure of how to got about this.

Callbacks or something sounds about right but being a JS novice I don't actually know what to search google for, let alone apply it yet.

Could someone give me a nudge in the right direction please?

Thanks, Rob.

plumsauce
05-11-2009, 04:33 PM
cookies are appropriate for storing state

robjohnston
05-11-2009, 04:51 PM
Any thoughts how I might go about it?

I've had a search around for "js dashboard cookies" but I'm still at a loss.

Thanks, Rob.

Adam-AEC
05-12-2009, 09:41 AM
Use the Cookies plugin for jQuery.

http://plugins.jquery.com/project/Cookie

I'll leave it up to you to find window positions/storing them in the cookie.

robjohnston
05-12-2009, 10:29 AM
Thanks all, I've found an example of exactly what I'm looking for:
http://james.padolsey.com/javascript/inettuts-with-cookies/

Cheers, Rob.