Developing chat box

Results 1 to 2 of 2

Thread: Developing chat box

  1. #1
    Join Date
    Dec 1969

    Default Developing chat box

    I am developing a chat box in ASP, using Application-variables (Application("line1"), Application("line2"), etc.) for saving and displaying the messages.<BR><BR>Now I want to provide private messaging. How to handle this, because Application-vars are visible to every user?

  2. #2
    Join Date
    Dec 1969

    Default I wouldn't store ..

    .. individual application variables, but rather a single 2-dimensional array.<BR><BR>Then, you could add an index that specifies a Recipient.<BR><BR>Const MSG_SENDER = 0<BR>Const MSG_RECIP = 1<BR>Const MSG_DATEPOSTED = 2<BR>Const MSG_TEXT = 3<BR><BR>Dim aMessages<BR> aMessages = Application("Messages")<BR><BR> For iCnt = 0 To UBound(aMessages, 2)<BR> If aMessages(MSG_RECIP, iCnt) = "" Or aMessages(MSG_RECIP, iCnt) = Session("LoggedInUserName") Then<BR> Response.Write aMessages(MSG_SENDER, iCnt) & " (" & aMessages(MSG_DATEPOSTED, iCnt) & "): " & aMessages(MSG_TEXT, iCnt) & "<BR>" & vbCrLf<BR> End If<BR> Next<BR><BR>How&#039;s that for writing some code? Sheesh - you would think it&#039;s early in the morning or something.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts