1 <div id="chatrecv_history" class="chatrecv_history">
3 <div id="chatrecv" class="chatrecv">
5 <div id="chatsend" class="chatsend">
6 <form method="POST" onsubmit="return chatsendfunc()" action="chat_send" id="chatsendid" name="chatsendform">
7 <input type="hidden" name="nonce" value="<?NONCE>">
8 <img src="static/citadelchat_32x.gif">
9 <textarea maxlength="1024" id="send_this_id" name="send_this" wrap="soft" rows="5" cols="80"
10 onKeyPress="chat_enter(event);"></textarea>
11 <input type="submit" value="<?_("Send")>">
14 <script type="text/javascript">
16 function chatsendfunc() {
17 $('chatsendid').request({
18 onComplete: function(){ $('send_this_id').value = '' }
23 function chat_enter(evt) {
24 var charCode = (evt.which) ? evt.which : window.event.keyCode;
30 new Ajax.PeriodicalUpdater('chatrecv', 'chat_recv', {
31 method: 'get', frequency: 2,
32 onSuccess: function(){
33 $('chatrecv_history').innerHTML =
34 $('chatrecv_history').innerHTML + $('chatrecv').innerHTML;
35 $('chatrecv').innerHTML = '';
36 $('chatrecv_history').scrollTop = 9999999;