Помогите, плиз, со скриптом чата.
Меня не устроил типовой чат от http://wawo.ru/. Мне захотелось встроить его в дизайн форума, и добавить некоторых удобств, навроде кнопок вместо ссылок, это я сделал сам ), и функцию отправки сообщения по нажатию Ентера (не смог ). Также я постарался объединить, дабы ускорить работу, два скрипта в один (получилось ). Теперь в скрипте только одна внешняя ссылка. Также мне очень надо добавить в него поддержку украинского шрифта, так как на форуме есть украиноговорящие люди. А чат не отображает укробуквы І,і Ї,ї Є,є. Помогите, пожалуйста, со скриптом.
Вот код
<!-- /*JW_CHAT ver. 2.3*/--> <div id='mfch' ><noscript>Для работы чата необходимо включить в Вашем браузере JavaScript</noscript> <script type="text/javascript" language="javascript" > this.document.write('<b>Чат форума ЗАЗ-Самодельщики</b>');/**/ this.document.write('<form name="frm" onSubmit="return false;">'); this.document.write('<div id="field"></div>'); this.document.write('<table border="0" cellpadding="0" cellpadding="0" width="100%"><tr>'); this.document.write('<td width="60" align=left><input type="text" name="name" maxlength="15" value="Гость" readonly="readonly" style="width:55px" onclick="changeN(\'get\')"></td>'); this.document.write('<td align=center><input type="text" name="msg" maxlength="500" style="width:100%; font-weight:normal" onpress Enter="sendmess()"></td>'); this.document.write('<td width="55" align=right><input type="button" name="send" onClick="sendmess()" value=">>>" style="width:50px" title="Отправить" style="width:100%; font-weight:normal"></td>'); this.document.write('</tr></table>'); this.document.write('</form>'); this.document.write('<input type="button" value="Смайлики" OnClick="javascript: past_sm();">'); this.document.write('<input type="button" value="Настроить" OnClick="javascript: changeN(\'get\')">');/**/ this.document.write('<input type="button" value="Чат" OnClick="http://johnwarner.mybb.ru/pages/chat_foruma">'); this.document.write('<div id="tip" onclick="document.frm.msg.focus();this.style.display=\'none\'" style="z-index:5000;text-align:left"></div>'); this.document.write('<img src="http://counting.kmindex.ru/0.gif?uid=171902&r='+escape(document.referrer)+'&'+Math.random()+'" width="1" height="1" border="0">') this.document.write('<div id="tip" onclick="document.frm.msg.focus();this.style.display=\'none\'" style="z-index:5000;text-align:left"></div>'); this.document.write('<div id="wawo" style="z-index:5000; text-align:center"></div>'); var Adis=0; var G_PR=0; var uidch='ch4bcf62c74cf6a'; this.document.write('<scr'+'ipt language="javascript" type="text/javascript" src="http://schoolday.zs9.ru/chat/main.js"><'+'/sc'+'ript>'); </script> </div>
Собственно, мне надо только настроить отправку по Ентеру, я, видимо, забыл что-то уже, или глаз замылился...
John Warner, форум http://zazself.mybb.ru
P.S.: Не кидайтесь тапкаме, если боян, плиз. Я только начинаю админить)))
P.P.S.: Совсем забыл - а как его заставить обновляться самостоятельно?
Просто у меня народ бывает в основном с форума с мощным чатом, там даже задаётся в окошке время обновления, это тоже было б гуд)
Отредактировано John Warner (Пт, 23 Апр 2010 18:47:43)