Re: Possible Cookie Usage?



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
.



Relevant Pages

  • Possible Cookie Usage?
    ... "flag" message that users can see when they log on. ... An initial thought I had was to use cookies: one that the staff ... user could set the flag (in a cookie or file) and have the communication ... write to a file and the building's web site code would read ...
    (comp.lang.javascript)
  • Re: Dover half staff flag
    ... The Fox broadcast showed a flag at half staff. ... It's called a law, you fucking moron. ...
    (rec.autos.sport.nascar)
  • Re: How to use SSL for login page only
    ... when a cookie itself has ... Joe Kaplan-MS MVP Directory Services Programming ... section will take care of the Secure flag. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Dover half staff flag
    ... The Fox broadcast showed a flag at half staff. ... when an average citizen dies then I definitely want to see it at half staff ...
    (rec.autos.sport.nascar)
  • Re: Dover half staff flag
    ... The Fox broadcast showed a flag at half staff. ... when an average citizen dies then I definitely want to see it at half staff ...
    (rec.autos.sport.nascar)