zzfive03
Programmer
- Jun 11, 2001
- 267
Good Afternoon.
I am trying to make a Chat room. I am attempting to store the contents of the entire room in a database field called "room". On my client page, I have a place for the user to type data and press submit. I want my submit to save the table and then update the textarea field WITHOUT refreshing the page. To do this, I am mixing Javascript and VB(server script). How do i call a server side VB scritp from my client side scripts??
'FYI Show = Response.Write
Show "<font color='blue'>"
Title "Chat Room!!"
Show "</font>"
Show "<table border=1><tr><td>"
Show "<textarea name='room' id='room' rows=20 cols=50></textarea>"
Show "<td valign='top'><small><b>People in Here</small></b><hr>"
Show "<tr><td colspan=2>"
Show "<textarea name='text' id='text' rows=5 cols=60 ></textarea>"
Show "<tr><td colspan=2><input type='button' value='Send' id='submit' name='submit'><input type='reset' value='Clear' name='clear'>"
%>
<Script Language='VBScript'>
SUB submit_onClick
room.value = room.value + vbCrLf + text.value
text.value = ""
End Sub
'at this point, i want to call a server function that will write to the database, then update my text area with the new data.
</Script>
Any help is appreciated
I am trying to make a Chat room. I am attempting to store the contents of the entire room in a database field called "room". On my client page, I have a place for the user to type data and press submit. I want my submit to save the table and then update the textarea field WITHOUT refreshing the page. To do this, I am mixing Javascript and VB(server script). How do i call a server side VB scritp from my client side scripts??
'FYI Show = Response.Write
Show "<font color='blue'>"
Title "Chat Room!!"
Show "</font>"
Show "<table border=1><tr><td>"
Show "<textarea name='room' id='room' rows=20 cols=50></textarea>"
Show "<td valign='top'><small><b>People in Here</small></b><hr>"
Show "<tr><td colspan=2>"
Show "<textarea name='text' id='text' rows=5 cols=60 ></textarea>"
Show "<tr><td colspan=2><input type='button' value='Send' id='submit' name='submit'><input type='reset' value='Clear' name='clear'>"
%>
<Script Language='VBScript'>
SUB submit_onClick
room.value = room.value + vbCrLf + text.value
text.value = ""
End Sub
'at this point, i want to call a server function that will write to the database, then update my text area with the new data.
</Script>
Any help is appreciated