~testplan-team/testplan/source-collection

« back to all changes in this revision

Viewing changes to htmlunit-2.4/src/test/resources/DWR/2.0.5/chat/javascript-chat.js

  • Committer: edA-qa mort-ora-y
  • Date: 2010-04-07 10:54:57 UTC
  • Revision ID: eda-qa@disemia.com-20100407105457-g46bvbsrjqtjujab
updating hmltunit src

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
function init() {
3
 
  dwr.engine.setActiveReverseAjax(true);
4
 
}
5
 
 
6
 
function sendMessage() {
7
 
  var text = dwr.util.getValue("text");
8
 
  dwr.util.setValue("text", "");
9
 
  JavascriptChat.addMessage(text);
10
 
}
11
 
 
12
 
function receiveMessages(messages) {
13
 
  var chatlog = "";
14
 
  for (var data in messages) {
15
 
    chatlog = "<div>" + dwr.util.escapeHtml(messages[data].text) + "</div>" + chatlog;
16
 
  }
17
 
  dwr.util.setValue("chatlog", chatlog, { escapeHtml:false });
18
 
}