[Javascript] General design question

Peter Brunone peter at brunone.com
Mon Jul 16 18:34:23 CDT 2001


RE: [Javascript] General design question
    Bear in mind that the session depends on cookies; if they're not enabled in the browser, then session-dependent code will break.
  ----- Original Message ----- 
  From: Andrew Dunn 
  To: javascript at LaTech.edu 
  Sent: Monday, July 16, 2001 6:08 PM
  Subject: RE: [Javascript] General design question


  I've just designed something like this. I found it better to save the admin variable in a session. The reason for this is because if the admin is going to be editing details of other people who can also log in (I don't know if your web site does this) You don't have to check two records in the DB, it makes things a bit simpler and probably a bit quicker as well.


  -----Original Message-----
  From: javascript-admin at LaTech.edu [mailto:javascript-admin at LaTech.edu]On Behalf Of Bill Marriott
  Sent: Tuesday, 17 July 2001 6:00 AM
  To: javascript at LaTech.edu
  Subject: Re: [Javascript] General design question


  Bob,

  Do you mean store a list of all the links in a table and flag them Admin Yes or No?
  Then use something like:

  if  (after SQL in link table) tblLink.fldAdmin = true then
  <a href="link.asp">Link</a>
  end if

  Bill

    ----- Original Message ----- 
    From: Filipiak, Bob (Contractor) 
    To: 'javascript at LaTech.edu' 
    Sent: Monday, July 16, 2001 10:12 PM
    Subject: RE: [Javascript] General design question


    Better yet, since you are using a DB why not modify the table to have a column with a Admin flag for those links that are for Admin only and validate the visitor against the db that way you don't have to rely on cookies being enabled. Just a thought.

    Bob Filipiak (Contractor) 
    MCP 

    -----Original Message----- 
    From: Andrew Dunn [mailto:adunn at mail.interworx.com.au] 
    Sent: Sunday, July 15, 2001 8:01 PM 
    To: javascript at LaTech.edu 
    Subject: RE: [Javascript] General design question 



    if you are using asp why not use a session variable to hold the user state 
    (if admin or not)? If the session variable ie. session("admin") = true then 
    display links or not display links. 

    if session("admin") = true then 
            <a href="link.asp">Link</a> 
    end if 
    --------%< Snipped %<---------------------------------------- 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20010716/dcfcf3d3/attachment.htm>


More information about the Javascript mailing list