/    Sign up×
Community /Pin to ProfileBookmark

setting checkbox

I created a playlist database of Windows Media files.
I created an HTML page with a list of links to the playlists.
I want to enable the user to click a checkbox when they have finished listening to the playlist.
The checkbox needs to be checked when they visit the page again.

There would need to be a checkbox for each playlist. (approx. 500)
This is all contained on one computer without using an internet connection.

I simply want to enable the user to know where they left off the last time they were on the page.

I have tried cookies but it didn’t work. (HTML Goodies: So you want to set a Cookie?) I’m sure that I am not finding the correct script/html matchup to make it work. I was successful in getting the cookie to work as long as I didn’t close the browser. (jut one cookie, not multiple)

There must be a way to do this. I am building this for a handicapped friend and trying to simplify as much as possible for him.

Any help would be greatly appreciated.

Thanks, kydco

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@QueryMar 19.2005 — Cookies may still be your answer, the learning curve on alternatives can be a bit steep.

This may help:

Quote:

Cookie expiry

Cookies are designed to have temporary lifespans. By default, this is just the current browser session; when the user unloads the browser, the cookie is deleted from their disk.

Alternatively you can set an expiry date when you create a cookie (see "Writing cookies" for details). The browser will then attempt to keep the cookie on disk until that date. However the cookie may be deleted before then for a number of possible reasons (for example because the cookie storage limit has been reached), so remember - always program defensively to handle "missing" cookies!

To delete an existing cookie, you write it with an expiry date earlier than the present date.

Note that there's no way of telling an existing cookie's expiry date, unless the page that created it included this information as part of its data value.

url for the rest of it:

http://www.paulspages.co.uk/pcp/cookielib/quickprimer.htm

Hope this helps,

-Q
×

Success!

Help @kydco spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...