Link to home
Start Free TrialLog in
Avatar of mcrmg
mcrmg

asked on

ASP chat using jquery

Hi,


Is there something that out there still "support" classic ASP?  LOL    thx  
ASKER CERTIFIED SOLUTION
Avatar of Wayne Barron
Wayne Barron
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mcrmg
mcrmg

ASKER

thanks   that made me fell better...lol  
Good.
I love Classic ASP, .NET is something that I am not too concerned about at the moment.
I will use the .NET technology when I have to, not before.

Classic ASP still rocks and can still do the same as .NET, with only a few exclusions.

Take Care
Carrzkiss
Avatar of mcrmg

ASKER

Hi,

I am sorry to bug you again since the question is closed.  I have looked at this, it is great, but I am having a problem, I need to have a seprate chat for ewach account...it looks like it can only have one, (maybe I am wrong?)

here is the test code   thx
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<% option explicit %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!--#include file="aspajax.asp"-->
<%
 ' ASPAjax.Path="/aspajax/"   ' instalation path 'ASPAjax.Path="/aspajax/"
 ASPAjax.Open()

%>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ASP AJAX Chat Application</title>
<link href="SampleContent/CSS/main.css" rel="stylesheet" type="text/css" />
</head>
<body>
<%
''''''''''''''''''''''''''''''''''SETUP CHAT''''''''''''''''''''''''''''''''''
Dim ChatArray, i
ChatArray = Application.Contents("ASPAJAX_ChatArray")

If not isArray(ChatArray) Then
 ChatArray=Array("","","","","","","","","","")
End If


Dim ChatArray1', i
ChatArray1 = Application.Contents("ASPAJAX_ChatArray")

If not isArray(ChatArray1) Then
 ChatArray1=Array("","","","","","","","","","")
End If

''''''''''''''''''''''''''''''''''PROCESS CHAT INPUT''''''''''''''''''''''''''''''''''
If Request.Form("SubmitChat")<>"" Then
Response.Write "111"
 For i =   0 to UBound(ChatArray)-1 
		ChatArray(i) =   ChatArray(i+1)
  Next
  ChatArray(UBound(ChatArray)) = "<em>"&time()&" "&Request.ServerVariables("REMOTE_HOST")&" : "&Request.Form("usrName") &" : </em>"& Request.Form("usrMsg")  & "<br />"

Application.Contents("ASPAJAX_ChatArray") = ChatArray
End If 


If Request.Form("SubmitChat1")<>"" Then
Response.Write "222"
 For i =   0 To UBound(ChatArray1)-1 
		ChatArray1(i) =   ChatArray1(i+1)
  Next
  ChatArray1(UBound(ChatArray1)) = "<em>"&time()&" "&Request.ServerVariables("REMOTE_HOST")&" : "&Request.Form("usrName1") &" : </em>"& Request.Form("usrMsg1")  & "<br />"

Application.Contents("ASPAJAX_ChatArray") = ChatArray1
End If 
''''''''''''''''''''''''''''''''''PROCESS CHAT INPUT''''''''''''''''''''''''''''''''''
%>
<h2>Chat Window:</h2>
<div>
  <%
	 Dim myPanel
	 Set myPanel = ASPAjax.CreateUpdatePanel
	 myPanel.Id = "CHAT123"
	 myPanel.RefreshInterval = 5 ' UpdatePanel self refreshes every 5 seconds 
	 Call myPanel.RegisterTrigger ("form1" , "onsubmit") ' Makes form1 use AJAX to refresh this UpdatePanel 
	 myPanel.Open
	 
	 

	 
%>
  <%''''''''''''''''''''''''''''''''''DRAW CHAT OUTPUT''''''''''''''''''''''''''''''''''%>
  <%=Join(ChatArray,"")%> <br />
  Last Checked: <%=time()%>
  <%
	myPanel.close
	set myPanel = nothing
	%>
</div>
<hr />
<form method="post" id="form1" action="">
  <label>Name
  <input type="text" name="usrName" value="User1" />
  </label>
  <label>Message
    <textarea name="usrMsg" cols="30" rows="4"></textarea>
  </label>
  <label>
  <input type="submit" value="Send" name="SubmitChat"    />
  </label>
</form>
<p style="clear:both"><br />
  <br />
  This chat application has been kept simple - so that it can be easily modified and skinned. </p>
  
    <%
	 Dim myPanel1
	 Set myPanel1 = ASPAjax.CreateUpdatePanel
	 myPanel1.Id = "CHAT1"
	 myPanel1.RefreshInterval = 5 ' UpdatePanel self refreshes every 5 seconds 
	 Call myPanel1.RegisterTrigger ("form2" , "onsubmit") ' Makes form1 use AJAX to refresh this UpdatePanel 
	 myPanel1.Open
	 
	 

	 
%>
  
  <%=Join(ChatArray1,"")%> <br />
  Last Checked: <%=time()%>
  <%
	myPanel1.close
	set myPanel1 = nothing
	%>
  
<form method="post" id="form2" action="">
  <label>Name
  <input type="text" name="usrName1" value="User2" />
  </label>
  <label>Message
    <textarea name="usrMsg1" cols="30" rows="4"></textarea>
  </label>
  <label>
  <input type="submit" value="Send" name="SubmitChat1"    />
  </label>
</form>
<p style="clear:both"><br />  
</body>
</html>
<% ASPAjax.Close()%>

Open in new window

I have not fully tested this script, so I am unable to advice you on it.
The only thing that I can suggest is to contact the developer or try to customize it yourself.

Right now I just do not have the extra time to mess around with it.
Sorry, but the best thing to do is to contact the developer and explain to him your needs
And see if his script will do it.
I am pretty sure that it will.

Take Care and Good Luck
Carrzkiss
Avatar of mcrmg

ASKER

okay, thanks
I have been using ASP since 2007 and had gone a lot of powerfull projects that had win some awards. I work with in in a third of time if I use .net. I love it