Guest User

Untitled

a guest
Sep 1st, 2015
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1.  
  2. alert('new file loaded');
  3.  
  4. var message_id=0;
  5. var chatid=0;
  6. var dest=0;
  7. var chat_txt='blank';
  8. var privacy=0;
  9. var message='blank';
  10.  
  11. jQuery(document).ready( function($) {
  12.  
  13. data={action: 'chat_comms', nonce: snonce, id: userid, txt: message};
  14. data.txt=message;
  15.  
  16. console.log('this is the first console log called on document load');
  17. console.log(data);
  18.  
  19. // ok we have logged the information being sent by ajax go ahead and send it...
  20. jQuery.post( ajaxurl, data, function(response) {
  21. console.log('this is the reply for the document.ready call');
  22. console.log(response);
  23. } );
  24.  
  25. } );
  26.  
  27.  
  28.  
  29. function send_message(value){
  30.  
  31. data.txt=value;
  32. data.snonce= 'now set';
  33.  
  34. console.log('this is the first console log called on send message');
  35. console.log(data);
  36.  
  37. jQuery.post( ajaxurl, data, function(response) {
  38. console.log('this is the reply for the send message call');
  39. console.log(response);
  40. } );
  41. }
  42.  
  43.  
  44. function open_chat(thread){
  45. document.getElementById('initiate_chat').style.display='inline';
  46. return false;
  47. }
Advertisement
Add Comment
Please, Sign In to add comment