Adding sending messages from javascript