/[projects]/miscJava/Test3/WebContent/WebsockTest.html
ViewVC logotype

Diff of /miscJava/Test3/WebContent/WebsockTest.html

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2113 by torben, Tue Feb 11 12:44:13 2014 UTC revision 2116 by torben, Tue Feb 11 13:02:21 2014 UTC
# Line 22  function append(str) { Line 22  function append(str) {
22  function sendMessage() {  function sendMessage() {
23          try {          try {
24                  var txt = $("#txt").val();                  var txt = $("#txt").val();
25                    txt = $.trim(txt);
26                  //append(txt);                  //append(txt);
27                    if (txt == "")
28                            return;
29                                    
30                  socket.send( "CHAT#" + txt);                  socket.send( "CHAT#" + txt);
31                                    
# Line 73  $( function() { Line 76  $( function() {
76                  var nick = $("#nick").val();                  var nick = $("#nick").val();
77                  nick = $.trim(nick);                  nick = $.trim(nick);
78                                    
79                    if (nick == "") {
80                            alert("Nick can not be empty");
81                            return;
82                    }
83                    
84                  try {                  try {
85                          socket.send( "NICK#" + nick);                                            socket.send( "NICK#" + nick);                  
86                  } catch(exception) {                  } catch(exception) {
# Line 87  $( function() { Line 95  $( function() {
95                  }                  }
96          });          });
97                    
98            $(window).unload(function(){
99                    socket.close();
100            });
101            
102  });  });
103    
104    

Legend:
Removed from v.2113  
changed lines
  Added in v.2116

  ViewVC Help
Powered by ViewVC 1.1.20