Re: Possible Cookie Usage?
- From: Bart Van der Donck <bart@xxxxxxxxxx>
- Date: Tue, 29 Apr 2008 03:16:51 -0700 (PDT)
Mike Copeland wrote:
In a Web site I'm building, I want to provide an ability to set a
"flag" message that users can see when they log on. Specifically, I
want the "flag" to show when the (snail) mail for our building has been
delivered, so people can come to the mailboxes to pick up their incoming
mail.
The problem is that I want to have a staff person "set the flag" in
some way. This person won't be technically savvy, nor would I want to
give them security permissions that their mistake could damage the site.
I also can't do the flag setting myself, as I won't always be available
at the time it's needed.
An initial thought I had was to use cookies: one that the staff
person could set and that my Web code could interpret and display. The
latter part seems simple enough, but I don't know how (or if) another
user could set the flag (in a cookie or file) and have the communication
work. That is, have the Web code access a cookie (or simple file) on a
specific user's (the staff person's) computer. In such a scenario, the
staff person would run a program or access a Web interface that would
write to a file (a cookie?) and the building's web site code would read
that information and report on it.
If this is possible, I don't quite know how to implement it. I
assume it's a simple JavaScript cookie reading activity, but I don't
know how to get that staff person's activity to write the file and where
it'd be stored. Any thoughts? TIA
I'm not sure how this could be solved with cookies.
Admin page:
Set flag: <select name="flag" size="1">
<option value="true">true</option>
<option value="false">false</option>
</select>
<input type="submit">
Then use your favourite server-side langue to receive the form data
and store it in a file.
User pages could then perform an XMLHttpRequest to that file. If it
holds 'yes', then show the mail-icon in question.
Hope this helps,
--
Bart
.
- References:
- Possible Cookie Usage?
- From: Mike Copeland
- Possible Cookie Usage?
- Prev by Date: Re: Missing event targets with mouseover/mouseout in Firefox 2.0
- Next by Date: Re: Possible Cookie Usage?
- Previous by thread: Re: Possible Cookie Usage?
- Next by thread: Re: Possible Cookie Usage?
- Index(es):
Relevant Pages
|