sendMessage JS ajax