title: jquery-ui chatbox stuck on sending a message
body: <p>I have decided to use :</p>
  
  <p><a href="http://reason.cs.illinois.edu/wenpu1/chatbox.html" rel="nofollow">http://reason.cs.illinois.edu/wenpu1/chatbox.html</a></p>
  
  <p>In a grails chat plugin, the functionality was working until I decided to make it open a pop up on user screen and am stuck on how to transmit message sent from primary popup to secondary </p>
  
  <p>so far usera hovers over userb's username and clicks on send pm  - this opens the box and transmits message fine ( i.e. old functionality was to send pm on main screen but only to user - no issues there)</p>
  
  <p>The change is to pop open a pm window and show message and allow user to interact back - it does pop it open but I think I need to write extra stuff which I have sort of called pm: inside the js below... just unsure how to get that pm to appear on the poped up box....</p>
  
  <p><a href="https://github.com/vahidhedayati/grails-wschat-plugin/blob/master/web-app/js/jquery.ui.chatbox.js" rel="nofollow">https://github.com/vahidhedayati/grails-wschat-plugin/blob/master/web-app/js/jquery.ui.chatbox.js</a></p>
  
  <p>So I guess I need to add pm: to this file:
  <a href="https://github.com/dexterpu/jquery.ui.chatbox/blob/master/jquery.ui.chatbox.js" rel="nofollow">https://github.com/dexterpu/jquery.ui.chatbox/blob/master/jquery.ui.chatbox.js</a></p>
  
  <p>does anyone knows what I am on about and how I can update the box with the message?</p>
  
  <pre><code> function sendPM(receiver,sender,pm) {
  $(function(event, ui) {
  var box = null;
  if(box) {
  box.chatbox("option", "boxManager").toggleBox();
  }else {
  box = $("#"+sender).chatbox({id:receiver,
  user:{key : "value"},
  title : "PM: "+receiver,
  messageSent : function(id, user, msg) {
            //$("#log").append(id + " said: " + msg + "&lt;br/&gt;");
             $("#"+suser).chatbox("option", "boxManager").addMsg(id, msg);
            webSocket.send("/pm "+suser+","+msg);
  },
  pm : function(sender, user, pm) {
  //$("#log").append(id + " said: " + msg + "&lt;br/&gt;");
  $("#"+sender).chatbox("option", "boxManager").addMsg(id, pm);
  //webSocket.send("/pm "+suser+","+msg);
  }})
  }
  });
  }
  </code></pre>